test for types before test for ids