title: How do i handle .FirstOrDefault method?
body: <p>When i am querying database with <code>.FirstOrDefault</code> method, how do i handle results that it has given to me? I am especially concerned about null values, currently i have something like that:</p>
  
  <pre><code>if (result == default(TypeOfResult))
  {
      handleIt();
  }
  </code></pre>
  
  <p>But i do not exactly know what is this "default", so i am wondering if it wasn't better to do it this way:</p>
  
  <pre><code>if (result == null)
  {
      handleIt();
  }
  </code></pre>
  
  <p>which one would work? And what exactly is this "default"?</p>