update isValid to work with native mongodb driver ObjectID objects