Fixed #23924 -- Made EmailMessage raise TypeError for type checks

This change avoids producing broken `To`, `Cc` and `Bcc` headers when passed a string instead of a list of strings.