Fixes
Fixed NullReferenceException when using case-insensitive operators on nullable strings (#100)
Case-insensitive string operators now correctly handle null values instead of throwing NullReferenceException.
Affected operators: @=, ==, !=, _=, -=, !@=, !=, !_-=, ^^, !^^
Before (broken):
var people = new List<Person>
{
new() { Email = null },
new() { Email = "[email protected]" }
};
// This threw NullReferenceException
var result = people.ApplyQueryKitFilter("""Email @=* "gmail" """);After (fixed):
// Now works correctly - returns only the person with "gmail" in their email
var result = people.ApplyQueryKitFilter("""Email @=* "gmail" """);
// Returns: [{ Email = "[email protected]" }]Behavior:
- Positive operators (@=, ==, _=, _-=, ^^*): null values are treated as non-matching
- Negative operators (!=, !@=, !=*, !-=, !^^): null values are included in results (since null ≠ any value)
This fix applies to both IQueryable (database queries) and IEnumerable (in-memory filtering) scenarios.