title: Vb.net Convert Integer DBNULL to 0 - error
body: <p>I'm having this method:</p>
  
  <pre><code>Private Function convertInteger(intInteger As Object) As Integer
  
      If IsDBNull(intInteger) Then
          convertInteger = 0
      Else
          convertInteger = cInt(intInteger)
      End If
  
  End Function
  </code></pre>
  
  <p>But it returns this error:</p>
  
  <p>operator '=' is not defined for type 'integer' and type 'dbnull'</p>
  
  <p>Im trying to convert a DBnull value to 0.. </p>
  
  <p>But the problem is that the value im trying to convert is not always DBnull.. so how should i handle this?</p>