Hi,
I was thinking that your module was displayed as a common module, so on a side of the website.
In your case, it seems to be more specific as it is on the menu and displayed on hover.
So not a default Joomla comportment, but displayed via your template or another component and that's why it is not hiding as it should by default.
You should contact the menu extension provider or the template editor, or add some javascript to hide the menu if the content is empty thanks to code like:
if($('.cartmodule div').html() == ''){
$('.cartmodule').hide();
}
(it require to add a custom class to the module)