Fix comparison of <select> value with search value

Fix comparison of <select> value with search value when there is no search value. This makes the code more correct, and potentially avoids unnecessary DOM manipulation.