+ // "IS NULL" and "IS NOT NULL" conditions can also deal with array values,
+ // so we return early for them to avoid problems.
+ if (in_array($condition['operator'], ['IS NULL', 'IS NOT NULL'], TRUE)) {
+ $should_be_set = $condition['operator'] === 'IS NOT NULL';
+ return $should_be_set === isset($value);
+ }
+