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