DRY up category existence tests.