I would rather move condition to `isCheckbox` helper method to improve readability and reduce code duplication.