Fix exception for missing email

Handle the case of missing email addresses.