code: public BsonDocument getHint() {
          if (hint == null) {
              return null;
          }
          if (!hint.isDocument()) {
              throw new IllegalArgumentException("Hint is not a BsonDocument please use the #getHintBsonValue() method. ");
          }
          return hint.asDocument();
      }
docs: Returns the hint for which index to use. The default is not to set a hint.
  
  @return the hint
  @since 3.6
  @mongodb.server.release 3.6