[database] cast MongoDB IDs into Strings in Mongo driver