title: Executing Expression ToLower on List throws exception
body: <p>I have the below code:</p>
  
  <pre><code>public Expression FilterString(string property, string value, ParameterExpression parameter)
  {
      //Create Message MemberExpression from parameter and properted eg/Message.Body
      var getname = Expression.Property(parameter, property);
  
      //Create expression for Not IsNullOrEmpty
      var isnullorempty = Expression.Not(Expression.Call(typeof(string), "IsNullOrEmpty", null, getname));
  
      //Create expression for member property equal to value eg/Message.Body = "hi"
      var toLower = Expression.Call(getname,
                           typeof(string).GetMethod("ToLower", System.Type.EmptyTypes));
      var compare = Expression.Equal(toLower, Expression.Constant(value));
  
      //Create expression combining Not IsNullOrEmpty AND Equal To
      var condition = Expression.And(isnullorempty, compare);
  
      return condition;
  }
  </code></pre>
  
  <p>If I run the below test I get a <code>NullReferenceException</code>, I assume because some of the items have a null body but thats exactly what the <code>Expression</code> should be testing.</p>
  
  <pre><code>private IEnumerable&lt;Message&gt; GetMessages()
  {
      var list = new List&lt;Message&gt;();
  
      var message = new Message() { Body = null, Properties = new Collection&lt;MessageProperty&gt;() };
      list.Add(message);
  
      message = new Message() { Body = "", Properties = new Collection&lt;MessageProperty&gt;() };
      list.Add(message);
  
      message = new Message() { Body = "Hello Everybody", Properties = new Collection&lt;MessageProperty&gt;() };
      list.Add(message);
  
      message = new Message() { Flag = 1, Properties = new Collection&lt;MessageProperty&gt;() };
      list.Add(message);
  
      message = new Message() { ChannelInt = 1,  Properties = new Collection&lt;MessageProperty&gt;() };
      list.Add(message);
  
      message = new Message() { Properties = new Collection&lt;MessageProperty&gt;(new[] { new MessageProperty() { Key = "Gender", Value = "male" } }) };
      list.Add(message);
  
      return list;
  }
  
  [Theory]
  [InlineData("Hello Everybody")]
  [InlineData("hello everybody")]
  public void FilterString_NullAndEmptyMessages_Removed(string searchTerm)
  {
      var messageList = GetMessages();
  
      var parameter = Expression.Parameter(typeof(Message), "message");
  
      var equalToFilterType = new EqualToFilterType();
  
      var filter = equalToFilterType.FilterString("Body", searchTerm, parameter);
  
      var lambda = Expression.Lambda(filter, parameter);
  
      //******EXCEPTION*******//
      var result = messageList.AsQueryable().Where((Expression&lt;Func&lt;Message, bool&gt;&gt;)lambda).ToList();
  
      Assert.Equal(1, result.Count);
  }
  </code></pre>
  
  <p>Any ideas how I can get this test to pass? (My expression code will be used to hit SQL Server too BTW)</p>