Check for nulls

All classes, including the UDF class, are contained in the UDX namespaces. There are two namespaces: the API version 1 namespace is nz::udx; the API version 2 namespace is nz::udx_ver2.

Before the function returns from the evaluate() method (for UDFs) or the finalResult() method (for UDAs), your function calls setReturnNull to set whether the return value is NULL. You configure how UDFs behave when database NULL values are encountered when you register the UDF with the CREATE FUNCTION command option:
[{RETURNS NULL ON NULL INPUT | CALLED ON NULL INPUT}]

The default setting is RETURNS NULL ON NULL INPUT. This option specifies that the evaluate() method is not called when any of the arguments are NULL. This setting has certain performance advantages if you want to skip your function if it is passed NULL values.

The CALLED ON NULL INPUT option specifies that the function is called even if NULL values are encountered. If you choose this option, use the following function within the evaluate() and finalResult() method to confirm whether your argument is NULL:
bool isArgNull(int n)