When dealing with dynamic creation of DOM objects, sometimes you need to check if a certain element exists. Below is how you check:
if ($('#my_element').length > 0){ // it exists! }
If you need to check whether a dropdown has any options, here is how
if ($('#my_dropdown option').length > 0){ // contains options }