is this cast save? Looks as if it is dependent from user input?