Fix test specs after package restructuring
Check if id obj exists before extracting value from it