Added additional null check for email