title: How to return empty string if an object is null?
body: <p>Here is a snippet of my code:</p>
  
  <pre><code>var link = socials.Where(p =&gt; p.type == Facebook).FirstOrDefault().URL;
  </code></pre>
  
  <p>the problem is that there aren't any social object in the list, <code>FirstOrDefault()</code> return <code>null</code>, and <code>.URL</code> trigger an exception.</p>
  
  <p>How can I avoid this in "one" line with LINQ? Thus, if null return empty <code>""</code> (or custom even better) string, else <code>.URL</code>?</p>