In order to handle NULLS I would suggest try one of the following options:
If you are using the interpolation variable when creating a base view from query option, then you can use** “ExecuteIfIsNotNull”** function. For example if you want the customerid to be not null then use this function which will execute only if the value is not null.
^ExecuteIfIsNotNull("\"customerId\" : \"",@CID,"\",","\"customerId\" : null,")
To know more about "ExecuteIfIsNotNull", read the section EXECUTION CONTEXT OF A QUERY AND INTERPOLATION STRINGS in Advanced VQL Guide.
Other operation to manage null is CASE where you can check if the arg is not null.
CASE WHEN arg1 IS NOT NULL THEN arg1
The COALESCE could be useful for you too which is similar to the case operator.
COALESCE(<param>, <param> [, <paramN>]*)
To know more about this function please read the section COALESCE in the Advanced VQL Guide.
There are also Comparison Operators like
- is Not NULL
- is NULL
To know more about about these operations read the section COMPARISON OPERATORS in the Advanced VQL Guide.
Hope this helps.