@Contract("_, null -> null; _, !null -> !null")
  public V valueOr(final @NotNull K key, final @Nullable V defaultValue) {
    final V value = this.value(key);
    return value == null ? defaultValue : value;
  }
Gets a value by its key or returns a fallback value.

@param key the key
@param defaultValue the fallback value
@return the value
@since 4.11.0
api/src/main/java/net/kyori/adventure/util/Index.java