Fixed error checking in behavior so it happens before crash.