fix null pointer exception for null emails