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

Thanks to noirbizarre for the report and initial patch.