private @Nullable Exception getValueSerializationProblem(@NotNull Map<?, Value> data, @NotNull Input input) {
    for (final Value value : data.values()) {
      //noinspection ExpressionComparedToItself
      if (!(Comparing.equal(value, value) && (value == null || value.hashCode() == value.hashCode()))) {
        return new Exception("Index " + myIndexId + " violates equals / hashCode contract for Value parameter");
      }

      try {
        ByteArraySequence sequence = AbstractForwardIndexAccessor.serializeValueToByteSeq(value,
                                                                                          myValueExternalizer,
                                                                                          4);
        Value deserializedValue = sequence == null ? null : myValueExternalizer.read(sequence.toInputStream());

        if (!(Comparing.equal(value, deserializedValue) && (value == null || value.hashCode() == deserializedValue.hashCode()))) {
          LOG.error(("Index " + myIndexId + " deserialization violates equals / hashCode contract for Value parameter") +
                    " while indexing " + input +
                    ". Original value: '" + value +
                    "'; Deserialized value: '" + deserializedValue + "'");
        }
      }
      catch (IOException ex) {
        return ex;
      }
    }
    return null;
  }
private @Nullable Exception getValueSerializationProblem(@NotNull Map<?, Value> data, @NotNull Input input)