title: How do I correctly check DBNull in VB?
body: <p>Why does the following code:</p>
  
  <pre><code>  A = not IsDBNull(CurRow("BuyBook")) AndAlso CType(CurRow("BuyBook"), string) = "Yes"
  </code></pre>
  
  <p>results in the following error:</p>
  
  <pre><code> Conversion from type 'DBNull' to type 'String' is not valid.
  </code></pre>
  
  <p>When AndAlso is supposed to short-circuit according to this article:</p>
  
  <p><a href="http://support.microsoft.com/kb/817250" rel="noreferrer">http://support.microsoft.com/kb/817250</a></p>