title: How to handle Null array in Linq
body: <p>I have a methods that takes multiple arrays and filter data using linq, the problem I am having is that one or more arrays could be null and I am not sure how to handle null arrays in Linq.:</p>
  
  <pre><code>public IPagedList&lt;SGProduct&gt; GetFilteredProducts(string catID, string[] houseID, int page = 1)
          {
              return MongoContext.Products.AsQueryable&lt;SGProduct&gt;().AsEnumerable().Where(x =&gt;houseID.Contains(x.HouseID.ToString()) &amp;&amp; x.ProductCategoryID.ToString() == catID).ToList().ToPagedList(page, 6);
          }
  </code></pre>
  
  <p>The houseID array could be null also I will have more parameters to this method like Size array etc.</p>
  
  <p>Any suggestions.
  Thanks</p>