HPCC-11226 Add NULL check added to master in another commit

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>