My tcl is a bit rusty, but I think you can just use
if { ![info exists item_id] } {
I don't fully understand your question. What you currently doing?
i had just followed the tutorial... 😉
See https://openacs.org/doc/openacs-5-2/tutorial.html
And wondered that the given code needs to be fixed!?!
If i'm right, the tutorial should be updated... If i'm wrong, please correct me...
Greetings, Nils