hmmm is it possible that the error checking called by some functions is workin wrong? or that the error checking is a bit too slow to return that there is sth to use into a var? because i cant explain it why i works for me like i described.
but good to know that the typcast is done while executing the command not while parsing.