Add null check for player on inventory open. It seems that there might
be cases where this event is fired and the player is null.