You receive the NullReferenceException exception when you call the String.IsNullOrEmpty function in an application that is built on the .NET Framework 2.0
When you call the STRING.ISNULLOREMPTY function in an application
that is built on the Microsoft .NET Framework 2.0, you receive the
NullReferenceException exception. This problem occurs if the following
conditions are true:
You call the STRING.ISNULLOREMPTY function by using a NULL
parameter, and you use the function in a loop.
You build the application in release mode with the default build