Add common tools lib
Convert _id to ObjectID instances if they are not already.