Check for false return value from preg_match.

Preg_replace can return false or a value equating to false, so explicitly check for a boolean false value.