Handles taskId appropriately including default 0 value.