[IOT-3219] Prevent Iotivity crash at OTM