Fixes T20.
ImapThread from_gmail_message(): check if g_thrid is None