Check array id->type instead of type