title: linq query fails only on Contains "Object reference not set to an instance of an object"
body: <p>I have a 2 stage query join that is failing on the Contains operator.  The error I'm getting is Object Reference not set to an instance of an object.  I'm creating dynamic queries up front, and executing in the join.</p>
  
  <p>This works:
  AQuery.Where("AssigneeName == \"Michael Jackson\"")</p>
  
  <p>This fails with "object reference not set to an instance of an object":
  AQuery.Where("AssigneeName.Contains(\"Michael Jackson\")")</p>
  
  <p>Here's my code:</p>
  
  <pre><code>        using (ReqEntitiesDataContext dc = new ReqEntitiesDataContext(SPContext.Current.Web.Url))
          {
  
              // LINQ Deferred Query Execution
              var AQuery = from a in dc.Assignees select a;
              if (assigneeQuery.Count &gt; 0)
              {
                  AQuery = from a in AQuery.Where(string.Join(" ", assigneeQuery.ToArray())) select a;
              }
  
              var RQuery = from r in dc.ReqLibrary select r;
              if (requestQuery.Count &gt; 0)
              {
                  RQuery = from r in RQuery.Where(string.Join(" ", requestQuery.ToArray())) select r;
              }
  
  
              // LINQ 2 Stage Query Execution Join
              var resultQuery = from a in AQuery.ToList() 
                                join r in RQuery on a.Title equals r.RequestID
                                orderby r.RequestID ascending
                                select new RequestType
                                {
                                    RequestID = r.RequestID,
                                    ReceivedDate = r.ReceivedDate.Value,
                                    RequestType = r.RequestType,                                 
                                    Assignee = a.AssigneeName,
                                    AssigneeSection = a.AssigneeSection,
                                    AssigneeDivision = a.AssigneeDivision,
                                    RequestStatus = r.RequestStatus
                                };
  
              CreateTableResults(resultQuery);
          }
  </code></pre>