Rewrite of nilOrEqualToString.