Add check in case parsedate failed.

email.utils.parsedate returns None if failed to parse date, add a check
to handle that.