Add null checks to user_controller