#SFC-50  Refactored converting ObjectId to text and again to object