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

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