check for null pointer exception in userlist