fix(REST/task): adjust null-check

related to CAM-3129