added test for null input in getEmails method