You can just specify false as the fallback_cb
argument of wp_nav_menu
. Nothing will show up -- rather, wp_nav_menu will return false (echoing nothing out).
<?php
wp_nav_menu(
array(
'theme_location' => $main_nav,
'menu_class' => 'nav',
'container' => '',
'fallback_cb' => false
)
);