> when value Z is not >= X?

Is your AI not even doing try/catch statements, what century are you in?