elem = driver.find_element_by_id("myId")
pass # whatever logic to handle...
Boolean dropdownPresent = driver.findElement("YOUR LOCATOR OF DROPDOWN").isDisplayed();
System.out.println("Dropdown is appearing");
System.out.println("Dropdown is not appearing");
WebDriver has a W3C specification that details out the information about the different visibility preferences based out on the types of the web elements.
isDisplayed() is the method used to verify presence of a web element within the webpage. The method returns a “true” value if the specified web element is present on the web page and a “false” value if the web element is not present on the web page.
isDisplayed() is capable to check for the presence of all kinds of web elements available.
isEnabled() is the method used to verify if the web element is enabled or disabled within the webpage.
isEnabled() is primarily used with buttons.
isSelected() is the method used to verify if the web element is selected or not.
isSelected() method is pre-dominantly used with radio buttons, drop downs and checkboxes.
for more understanding check this link
Hope it helps