Added check if menu is empty to fix JS error when it is.

Using the updated theme, I found a bug in the smooth menu JS code when the menu is empty. I added a check for this condition to prevent a JS error in the browser.