How to convert a String field to ObjectId in MongoSinkConnector

I’m willing to use default document id strategy.
My concern is not _id.

There are some fields which are saved as string in Kafka topic, but their actual values are ObjectID.
For example, Kafka message contains commnetId, userId which represents who has updated the comment.
And in our database, we have user and comment collections.
How can we convert such values to ObjectID in MongoDB Kafka Sink Connector?