code: @Deprecated
    public static ObjectId massageToObjectId(Object o) {
      if (o == null)
        return null;
  
      if (o instanceof ObjectId)
        return (ObjectId) o;
  
      if (o instanceof String) {
        String s = o.toString();
        if (isValid(s))
          return new ObjectId(s);
      }
  
      return null;
    }
docs: Turn an object into an <code>ObjectId</code>, if possible.
  Strings will be converted into <code>ObjectId</code>s, if possible, and <code>ObjectId</code>s will
  be cast and returned.  Passing in <code>null</code> returns <code>null</code>.
  
  @param o the object to convert
  @return an <code>ObjectId</code> if it can be massaged, null otherwise
  @deprecated This method is NOT a part of public API and will be dropped in 3.x versions.