The query below was our first attempt with email:

If the field doesn't exist (as it was the case for email IS NULL; --), the server throws an error. We saw another 500 Internal Server Error but this could vary from application to application.