private RuntimeException throwTypeMismatch(String expectedType) {
        return new RuntimeException(format("Expected `%s` but was `%s` with value: `%s`",
                expectedType,
                getType(),
                this));
    }
Returns the current value as a {@link StringValue}, throwing
{@link RuntimeException} when the value is the wrong type.

@return returns a string value.
smithy-rules-engine/src/main/java/software/amazon/smithy/rulesengine/language/evaluation/value/Value.java