@SuppressWarnings("unchecked")
    public static <T extends Type> T unwrap(T type) {
        Type unwrapped = null;
        if (type instanceof SerializableTypeProxy) {
            unwrapped = ((SerializableTypeProxy) type).getTypeProvider().getType();
        }
        return (unwrapped != null ? (T) unwrapped : type);
    }
Unwrap the given type, effectively returning the original non-serializable type.

@param type the type to unwrap
@return the original non-serializable type
analyzer/src/main/java/nl/basjes/parse/useragent/utils/springframework/core/SerializableTypeWrapper.java