fix(REST): provide null-check to avoid NullPointerException

related to CAM-2374