Checking null values

When checking for null values, the best practice is to use the IDONull.IsNull static method. For parameter or property values in an IDO protocol class, you can also use the IsNull property to check for null values.

// Check for null value in a LoadCollectionResponseData: 

{ 
   if (!loadResponse(0, "UserId").IsNull) 
   { 
         userId = loadResponse(0, "UserId").GetValue<long>(-1); 
   } 
} 

// Check for a null parameter value: 
public int MyFunc(Nullable<int> param) 
{ 
   // Test for a null value: 
   if (IDONull.IsNull(param)) 
   { 
         // Handle the null parameter. 
   } 
}