internal bool HasTypeConstraint(string?typeName) { if (_operator == ExpressionType.And) { return(_left.HasTypeConstraint(typeName) || _right.HasTypeConstraint(typeName)); } else if (Function != null && Function.FunctionName == ODataLiteral.IsOf) { return(Function.Arguments.Last().HasTypeConstraint(typeName)); } else if (Value != null) { return(Value is Type valueType && valueType.Name == typeName); } else { return(false); } }