protected function prepareValueAndOperator($value, $operator)
    {
        if (is_null($value) && ! in_array($operator, ['='])) {
            $value = $operator;
            $operator = '=';
        } elseif (! in_array($operator, ['='])) {
            throw new \InvalidArgumentException('Illegal operator and value combination.');
        }

        if (is_null($value)) {
            $value = 'NULL';
            $operator = 'IS';
        } else {
            $value = compact('value');
        }

        return [$value, $operator];
    }