Better handling of types with/without ids.