@Override
    @SuppressWarnings("unchecked")
    public final @NonNull <V> Optional<V> optional(final @NonNull CloudKey<V> key) {
        final Object value = this.metaMap.get(key);
        if (value == null) {
            return Optional.empty();
        }
        if (!GenericTypeReflector.isSuperType(key.type().getType(), value.getClass())) {
            throw new IllegalArgumentException("Conflicting argument types between key type of "
                    + key.type().getType().getTypeName() + " and value type of " + value.getClass());
        }

        return Optional.of((V) value);
    }
A simple immutable string-string map containing command meta
cloud-core/src/main/java/org/incendo/cloud/meta/SimpleCommandMeta.java