title: How to detect IsNull / NotNull when building dynamic LINQ expressions?
body: <p>I'm building dynamic LINQ expression that is later evaluated. So for example if I want to know if certain property is equal to some value I do:</p>
  
  <pre><code>// MemberExpression property;
  // int? val;
  Expression.Equal(property, Expression.Constant(val))
  </code></pre>
  
  <p>However, I can't seem to find a way to detect if val Is Null or NOT Null. Can somebody recommend to me how to do that? I've tried this:</p>
  
  <pre><code>Expression.Equal(property, Expression.Constant(null, property.Type));
  </code></pre>
  
  <p>but obviously, that won't work.</p>