Improved selector existence test