title: Question about Type Comparison ASP.NET and DBNull
body: <p>I have a function that pulls articles records from an MSSQL database. Some are URLs to PDFs, and other are actual articles stored in the SQL. The articles that are stored do not have a URL (DBNull) in the record, so I want to be able to parse that. I tried a simple test:</p>
  
  <pre><code>If Row.Item("url").GetType Is GetType(DBNull) Then
      //' do something here....
  End If
  </code></pre>
  
  <p>However, I get the "<code>Conversion from type 'DBNull' to type 'String' is not valid.</code>" exception.  The funny part is, when I do a watch on the above conditional, it returns <code>True</code> or <code>False</code>.</p>
  
  <p>Anyone know why this is happening and/or a way to fix this? Thanks!</p>