ensuring mongo id is the correct type when updating record in db