null check user when getting user id from session