How do I check menu slug in WordPress?

There is no official way as far as I know. You should be prefixing your menu_slug’s with some string that is almost guaranteed to be unique (e.g., ‘your_company_name_your_plugin_name_your_menu_slug’).

That said, looking into the source for add_submenu_page(), the following should work, but I offer no guarantees (and, see the BIG caveat below):

/**
 * test whether $menu_slug is already used in $parent_slug in admin menus
 *
 * This function should be called **no sooner** than the 'admin_menu' action!
 *
 * Note: this has only been tested in WP 4.7 and relies on undocumented internals,
 * and MIGHT not work in ANY other version of WP!!
 *
 * @param $menu_slug string the proposed menu slug
 * @param $parent_slug string the parent slug
 * @return bool true if $menu_slug already exists in $parent_menu, false otherwise
 */
function
is_menu_slug_available ($menu_slug, $parent_slug)
{
    global $_registered_pages ;

    $menu_slug = plugin_basename ($menu_slug) ;
    $parent_slug = plugin_basename ($parent_slug) ;

    $hookname = get_plugin_page_hookname ($menu_slug, $parent_slug) ;

    return (!(isset ($_registered_pages[$hookname]) && true === $_registered_pages[$hookname])) ;
}

Caveat

It is almost always a BAD IDEA to rely on undocumented internals such as this! Since they are undocumented, the WP team could change how things work under the hood at ANY time and you’d be screwed!