Somewhere in your saving code you compare a integer to a variable.
This variable has the dbnull value.
If this is within your stored procedure you can use the 'isnull(value,returnvalue)' method from TSQL.
If this is in your .NET code you'll have to check if the variable is dbnull (there is a function for that 'IsDBNull' that returns a boolean).
You can write your own Isnull function if you want.
Something along the lines of this:
Public Shared Function IsNull(ByVal controleValue As Object, ByVal returnValue As Object) As Object
If IsDBNull(controleValue) Or controleValue Is Nothing Then
Return returnValue
Else
Return controleValue
End If
End Function