public ValueAndTimestamp<V> get(final K key) {
        if (timestampedStore != null) {
            return timestampedStore.get(key);
        }
        if (versionedStore != null) {
            final VersionedRecord<V> versionedRecord = versionedStore.get(key);
            return versionedRecord == null
                ? null
                : ValueAndTimestamp.make(versionedRecord.value(), versionedRecord.timestamp());
        }
        throw new IllegalStateException("KeyValueStoreWrapper must be initialized with either timestamped or versioned store");
    }
A wrapper class for non-windowed key-value stores used within the DSL. All such stores are
instances of either {@link TimestampedKeyValueStore} or {@link VersionedKeyValueStore}.

@param <K> The key type
@param <V> The value type
streams/src/main/java/org/apache/kafka/streams/state/internals/KeyValueStoreWrapper.java