It's not though. Like I said, if you know that player is always unequal to NULL, you can simply remove the check wether you is NULL or not, because if it is equal to player, it's definitely not NULL. If you don't know if player is NULL or not, you can put the check wether you is NULL or not together into the same if and make your code cleaner and easier to read