v.23.8Improvement

Make hasTokenOrNull and hasTokenCaseInsensitiveOrNull Return Null for Empty Needles

Make hasTokenOrNull and hasTokenCaseInsensitiveOrNull return null for empty needles. #53059 (ltrk2).
The functions hasTokenOrNull and hasTokenCaseInsensitiveOrNull now return null when the needle (search token) is empty.

Why it matters

This change resolves ambiguous behavior when these functions receive an empty needle by explicitly returning null. It improves data correctness and consistency by clearly indicating that a search with an empty token is undefined rather than returning a misleading true or false.

How to use it

Use the hasTokenOrNull and hasTokenCaseInsensitiveOrNull functions as before. When the needle argument is empty, these functions will now return null instead of false or true.