Fix to get object by id when id is integer value

Change-Id: Ieeb16b406e3bcad5ba0186c9a886f2e9767161d0