Controlling null pointers related to User