Fixed #20462 -- null/non-string regex lookups are now consistent

Thanks to noirbizarre for the report and initial patch. (https://github.com/django/django/pull/1043)

Ticket: https://code.djangoproject.com/ticket/20462

This change addresses the following issues with regex lookups:
 - failure if field value is None/null for SQLite
 - failure if field type is not a string based type for SQLite and PostgreSQL