Refactor check_enter_menu