I am having trouble with data coming from a com object. I was using this in my code, then after verifying it worked, I moved it to a function so I could use it anywhere. Now I am getting the "Not a legal Oleaut date" error again. Has anyone had problems with this?

Old code:
Code:
If Not CStr(objTransHistNonCash.KCM_LTR_SENT_DATE) Is dbnValue Then
     If objTransHistNonCash.KCM_LTR_SENT_DATE > CDate("12/30/1899") Then
        rowTransHistNonCash("Letter Date") = Trim(objTransHistNonCash.KCM_LTR_SENT_DATE)
     End If
End If
New function:
Code:
   
Public Function blnNullDate(ByVal varDate) As Boolean
        Dim dbnValue As System.DBNull
        If Not CStr(varDate) Is dbnValue Then
            If varDate > CDate("12/30/1899") Then
                Return False
            Else
                Return True
            End If
        Else
            Return True
        End If
    End Function