public override HqlTreeNode BuildHql(MethodInfo method, Expression targetObject, ReadOnlyCollection<Expression> arguments, HqlTreeBuilder treeBuilder, IHqlExpressionVisitor visitor) { var constantParameter = arguments[1] as ConstantExpression; if (constantParameter != null && constantParameter.Value == null) return treeBuilder.IsNotNull(visitor.Visit(arguments[0]).AsExpression()); else return treeBuilder.Inequality( visitor.Visit(arguments[0]).AsExpression(), visitor.Visit(arguments[1]).AsExpression()); }