Rename helper function to hasSelector