code: public static <K, T extends V, V> KeyValue<K, V> fromNullable(K key, T value) {
  
          if (value == null) {
              return empty(key);
          }
  
          return new KeyValue<K, V>(key, value);
      }
docs: Creates a {@link KeyValue} from a {@code key} and{@code value}. The resulting value contains the value if the
  {@code value} is not null.
  
  @param key the key, must not be {@literal null}.
  @param value the value. May be {@literal null}.
  @param <K>
  @param <T>
  @param <V>
  @return the {@link KeyValue}