[fix] check if type of email is set
Merge pull request #177 from dacrome/fixed-type-nullpointer

[fix] check if type of email is set