Fix id type checking