try catch converting id to object id