javascript check if dropdown is selected