Code review comment: Consider adding some additional validation of tenant id

Code under review:
private static void verifyValues(JsonNode root) {
        var cursor = new JsonAccessor(root);
        cursor.get("rules").forEachArrayElement(rule -> rule.get("conditions").forEachArrayElement(condition -> {
            var dimension = condition.get("dimension");
            if (dimension.isEqualTo(DimensionHelper.toWire(FetchVector.Dimension.APPLICATION_ID))) {
                condition.get("values").forEachArrayElement(conditionValue -> {
                    String applicationIdString = conditionValue.asString()
                            .orElseThrow(() -> new IllegalArgumentException("Non-string application ID: " + conditionValue));
                    
                    ApplicationId.fromSerializedForm(applicationIdString);
                });
            } else if (dimension.isEqualTo(DimensionHelper.toWire(FetchVector.Dimension.NODE_TYPE))) {
                condition.get("values").forEachArrayElement(conditionValue -> {
                    String nodeTypeString = conditionValue.asString()
                            .orElseThrow(() -> new IllegalArgumentException("Non-string node type: " + conditionValue));
                    
                    NodeType.valueOf(nodeTypeString);
                });
            } else if (dimension.isEqualTo(DimensionHelper.toWire(FetchVector.Dimension.CONSOLE_USER_EMAIL))) {
                condition.get("values").forEachArrayElement(conditionValue -> conditionValue.asString()
                        .orElseThrow(() -> new IllegalArgumentException("Non-string email address: " + conditionValue)));
            } else if (dimension.isEqualTo(DimensionHelper.toWire(FetchVector.Dimension.TENANT_ID))) {
                condition.get("values").forEachArrayElement(conditionValue -> conditionValue.asString()
                        .orElseThrow(() -> new IllegalArgumentException("Non-string tenant ID: " + conditionValue)));
            }
        }));
    }

Line commented on: condition.get("values").forEachArrayElement(conditionValue -> conditionValue.asString()

Revised code:
private static void verifyValues(JsonNode root) {
        var cursor = new JsonAccessor(root);
        cursor.get("rules").forEachArrayElement(rule -> rule.get("conditions").forEachArrayElement(condition -> {
            var dimension = condition.get("dimension");
            if (dimension.isEqualTo(DimensionHelper.toWire(FetchVector.Dimension.APPLICATION_ID))) {
                condition.get("values").forEachArrayElement(conditionValue -> {
                    String applicationIdString = conditionValue.asString()
                            .orElseThrow(() -> new IllegalArgumentException("Non-string application ID: " + conditionValue));
                    
                    ApplicationId.fromSerializedForm(applicationIdString);
                });
            } else if (dimension.isEqualTo(DimensionHelper.toWire(FetchVector.Dimension.NODE_TYPE))) {
                condition.get("values").forEachArrayElement(conditionValue -> {
                    String nodeTypeString = conditionValue.asString()
                            .orElseThrow(() -> new IllegalArgumentException("Non-string node type: " + conditionValue));
                    
                    NodeType.valueOf(nodeTypeString);
                });
            } else if (dimension.isEqualTo(DimensionHelper.toWire(FetchVector.Dimension.CONSOLE_USER_EMAIL))) {
                condition.get("values").forEachArrayElement(conditionValue -> conditionValue.asString()
                        .orElseThrow(() -> new IllegalArgumentException("Non-string email address: " + conditionValue)));
            } else if (dimension.isEqualTo(DimensionHelper.toWire(FetchVector.Dimension.TENANT_ID))) {
                condition.get("values").forEachArrayElement(conditionValue -> conditionValue.asString()
                        .orElseThrow(() -> new IllegalArgumentException("Non-string tenant ID: " + conditionValue)));
            }
        }));
    }