public String expectStringValue() {
        if (value instanceof String) {
            return (String) value;
        }

        throw new JmespathException("Expected a string literal, but found " + value.getClass());
    }
Gets the value as a string.

@return Returns the string value.
@throws JmespathException if the value is not a string.
smithy-jmespath/src/main/java/software/amazon/smithy/jmespath/ast/LiteralExpression.java