Ah, so if you’re passing the menu id, slug or name then you need to get the menu object yourself in your filter. https://codex.wordpress.org/Function_Reference/wp_get_nav_menu_object. WP is just passing back exactly what you pass in for $args
. My testing was done on a basic theme and the menu is called using wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu', 'menu_id' => 'primary-menu' ) );