Change Py3-incompatible is-this-a-string type-check hack in send_mail_template