add tests for email.isGmail
adjust middleware to not error, only clean values