Eliminate logic for null regular expressions