Add null checks where the player may be null.