If you use CType or CInt or another conversion function to convert the nullable integer to a regular integer, a null value will be converted to zero.
Check to see if the nullable type has a value as in @Rhapsody 's answer.
You can also use the nullable type methods .GetValueOrDefault() and .GetValueOrDefault(x). The overload without any parameters returns the default value of the datatype if the value is null. E.g. Integer default value is zero; Boolean default value is False. The overload with a parameter allows you to specify a default value to use if the value is null.
Nullable.GetValueOrDefault Method
getValue()returnsInteger?, then the.Valueproperty is of type Integer. Just useblah.getValue().Value. Or also useblah.getValue().GetValueOrDefault(<default value here>)