title: How to null check c# 7 tuple in LINQ query?
body: <p>Given:</p>
  <pre><code>class Program
  {
      private static readonly List&lt;(int a, int b, int c)&gt; Map = new List&lt;(int a, int b, int c)&gt;()
      {
          (1, 1, 2),
          (1, 2, 3),
          (2, 2, 4)
      };
  
      static void Main(string[] args)
      {
          var result = Map.FirstOrDefault(w =&gt; w.a == 4 &amp;&amp; w.b == 4);
  
          if (result == null)
              Console.WriteLine(&quot;Not found&quot;);
          else
              Console.WriteLine(&quot;Found&quot;);
      }
  }
  </code></pre>
  <p>In the above example, a compiler error is encountered at line <code>if (result == null)</code>.</p>
  <blockquote>
  <p>CS0019    Operator '==' cannot be applied to operands of type '(int a, int b, int c)' and '&lt;null&gt;'</p>
  </blockquote>
  <p>How would I go about checking that the tuple is found prior to proceeding in my &quot;found&quot; logic?</p>
  <p>Prior to using the new c# 7 tuples, I would have this:</p>
  <pre><code>class Program
  {
      private static readonly List&lt;Tuple&lt;int, int, int&gt;&gt; Map = new List&lt;Tuple&lt;int, int, int&gt;&gt;()
      {
          new Tuple&lt;int, int, int&gt; (1, 1, 2),
          new Tuple&lt;int, int, int&gt; (1, 2, 3),
          new Tuple&lt;int, int, int&gt; (2, 2, 4)
      };
  
      static void Main(string[] args)
      {
          var result = Map.FirstOrDefault(w =&gt; w.Item1 == 4 &amp;&amp; w.Item2 == 4);
  
          if (result == null)
              Console.WriteLine(&quot;Not found&quot;);
          else
              Console.WriteLine(&quot;Found&quot;);
      }
  }
  </code></pre>
  <p>Which worked fine.  I like the more easily interpreted intention of the new syntax, but am unsure on how to null check it prior to acting on what was found (or not).</p>