public static Object unwrap(Object potentiallyOptional) {
        if (potentiallyOptional instanceof Optional<?>) {
            return unwrap((Optional<?>) potentiallyOptional);
        } else {
            return potentiallyOptional;
        }
    }
If the specified object is an {@code Optional}, the inner value will be
returned. Otherwise, the object is returned directly.

@param potentiallyOptional  the object that might be an {@code Optional}
@return                     the object or its inner value
runtime-parent/runtime-core/src/main/java/com/speedment/runtime/core/util/OptionalUtil.java