title: Using VB.NET IIF I get NullReferenceException
body: <p>I am doing a little debugging, and so I want to log the eventArgs value</p>
  
  <p>I have a simple line that basically does:</p>
  
  <pre><code>logLine = "e.Value: " + IIf(e.Value Is Nothing, "", e.Value.ToString())
  </code></pre>
  
  <p>The way I understand the IIF function, if the e.Value is Nothing (null) then it should return the empty string, if not it should return the .ToString of the value. I am, however getting a NullReferenceException. This doesn't make sense to me.</p>
  
  <p>Any idea's?</p>