New GetID function for objects