Ensure correct type of id sub-object.