title: String comparison throws null reference exception
body: <p>I am trying to find a user in my database, searching for email and phonenumber.
  How ever, if I use a List or IEnumerable I'm getting a null refence exception. If I don't use any of those, an "Not supported by SQL ... " is thrown.</p>
  
  <p>My method:</p>
  
  <pre><code>public List&lt;tblMember&gt; getAllMembers()
  {
      return db.tblMembers.ToList();
  }
  
  private void confirmMembership(string email, int phoneNumber)
  {
      //var allMembers = db.tblMembers.AsEnumerable(); throws same exception
      tblMember member = getAllMembers().FirstOrDefault(x =&gt; x.email.Equals(email, StringComparison.OrdinalIgnoreCase) &amp;&amp; x.phoneNumber == phoneNumber); //This line throws exception, around email.Equals()
      if (member != null)
      {
          member.isConfirmed = true;
          db.SubmitChanges();
      }
      else
          throw new Exception("Member not found");
  }
  </code></pre>
  
  <p>If I perform the search like this, no exception is thrown:</p>
  
  <pre><code>private void confirmMembership(string email, int phoneNumber)
  {
      //var allMembers = db.tblMembers.AsEnumerable(); throws same exception
      tblMember member = getAllMembers().FirstOrDefault(x =&gt; x.email == email &amp;&amp; x.phoneNumber == phoneNumber);
      if (member != null)
      {
          member.isConfirmed = true;
          db.SubmitChanges();
      }
      else
          throw new Exception("Member not found");
  }
  </code></pre>
  
  <p>How can this be?</p>