Maybe it is easier to add check for isNull to header file?