Make hasValidSelector easier to read