title: "Conversion from type 'DBNull' to type 'Boolean' is not valid", after checking that it's not DBNull
body: <p>In my ASP.Net Web-Application, I'm getting this error:</p>
  
  <blockquote>
    <p>Conversion from type 'DBNull' to type 'Boolean' is not valid.</p>
  </blockquote>
  
  <p>From this function:</p>
  
  <pre><code>Namespace atc
      Public Class Nil
          '...
          Public Shared Function Bool(ByVal Item As Object) As Boolean
              Return IIf(Item IsNot Nothing AndAlso Not IsDBNull(Item), CBool(Item), False)
          End Function
          '...
      End Class
  End Namespace
  </code></pre>
  
  <p>As you can see, I'm explicitly checking if <code>Item</code> is <code>DBNull</code>, and if it is then I return <code>False</code>. </p>
  
  <p>The error does <strong>not</strong> occur when <code>Item</code> is <strong>not</strong> <code>DBNull</code>, so I don't understand why this is happening. </p>