title: Catch NullReferenceException or test for Nothing first?
body: <p>We have a property whose job is to look up a description. If the lookup fails it should show an empty string.</p>
  
  <p>So we can code the property like this:</p>
  
  <pre><code>If foo.bar Is Not Nothing Then
    Return foo.bar.Description
  Else
    Return String.Empty
  End If
  </code></pre>
  
  <p>But that involves executing foo.bar twice, and if doing so is expensive, it's probably better like this:</p>
  
  <pre><code>Dim b As bar = foo.bar
  If b IsNot Nothing Then
    Return b.Description
  Else
    Return String.Empty
  End If
  </code></pre>
  
  <p>But really all we want to do is treat any kind of error as an empty description. So in some ways this is simpler:</p>
  
  <pre><code>Try
    Return foo.bar.Description
  Catch e As NullReferenceException
    Return String.Empty
  End Try
  </code></pre>
  
  <p>But are there any problems (performance, purity, other?) with just catching and ignoring the error?</p>
  
  <p>You sometimes read it's <em>expensive to throw an exception</em> but I am not sure whether the author means it's expensive to build in exceptions using the <code>Throw</code> keyword (which I am not doing) or whether he means it's expensive to allow exceptions to occur (as I would be doing).</p>