Examples of how we are testing against null values include the use of the stringutils method IsNullOrEmpty, as well as with a flat out conditional statement like if x "= NULL". I do not know if there is much difference or under what conditions these values may actually be null.
What experiences have other developers had with null values?
Is there risk of memory leaks if we ignore or misuse such checks?
Posted: 4 years ago
Posted: 4 Dec 2017 17:08 EST
Andrew Grondin (grona)
GCS Solutions Engineer I
There's not really any documentation pertaining to this; you could get some best practices advise from Services. In personal experience, most of the "regular" data types (int, string, etc.) are either initialized at compile time or allowed to be null. You'll always get an object reference not set to an instance of an object or a null value exception if you call on something that hasn't been ascribed a value, but more often than not you'll see these in relation to unmatched objects.