Make `regexNull` safer