title: LINQ, where clause if field is int?
body: <p>Given the following LINQ where clause :</p>
  
  <p>plannedPosition.Id is of type int?</p>
  
  <p>pmArray is of type int[]</p>
  
  <pre><code>//Works
  where
  pmArray.Contains(plannedPosition.Id.Value)
  
  
  //Does not work - will give a design time error
  where
  pmArray.Contains(plannedPosition.Id)
  </code></pre>
  
  <p>How can I make the query more robust to ensure that no null run type exceptions occur?</p>