class TypeTypeConverter implements TypeConverter {

    @Override
    public String toString(Type ignored, Object value) {
        if (value == null) {
            return Expression.Undefined.class.getName();
        }
        String result = typeToStringCache.get(value);
        if (result == null) {
            result = convertType(value);
            String prev = typeToStringCache.putIfAbsent((Type) value, result);
            result = prev != null ? prev : result;
        }
        return result;
    }

}