added safety check around null email or nickname