refactor tag checking in Selector init