prevent user id is null