title: How to check if DataReader value is not null?
body: <p>I'm writing a VB.Net code that reads an Oracle Table through an SQL query.</p>
  
  <p>The SQL query may return some null columns. I'm trying to check if these columns are null or not but I'm receiving the error <strong>An exception of type 'System.InvalidCastException' occurred in Oracle.DataAccess.dll but was not handled in user code. The column contains some Null Data</strong> </p>
  
  <p>Here is my code : </p>
  
  <pre class="lang-vb prettyprint-override"><code>Dim Reader as OracleDataReader 
  'Execute the query here...
  
  Reader.Read()
  If IsNothing(Reader.GetDateTime(0)) Then  'Error here !!
      'Do some staff 
  end if
  </code></pre>
  
  <p>Does anyone have an idea on how to check if a column is null please ?</p>
  
  <p>Thank you</p>