Quote: "Basically what happen is, the script has YET to define what type the variable is!"
You shouldn't be trying to do this in a strongly typed language like AppGameKit BASIC (which also isn't OO).
It's also bad practice to declare something inside a conditional and then attempt to use it after the conditional.
I could be wrong on this but I'm pretty sure AppGameKit functions can only return the one data type determined by the variable that you return. Flourescent's quote seems to confirm this.
The best solution in this instance is Markus's.