How to properly check the menu for emptiness in twig?
This is tricky as you would expect {% if drupal_menu('main') is empty %} to work for checking if the menu exists or not. In reality, you'll want to use the render filter for twig. So that would become:
{% if drupal_menu('main') | render %}

I tested this code in my theme's page.html.twig file and it works. e.g.
{% if drupal_menu('main') | render %}
  {{ 'Main menu is not empty'|t }}
{% else %}
  {{ 'Main menu is empty'|t }}
{% endif %}

There is a very long winded issue here with regard to this:
[meta] Themes improperly check renderable arrays when determining visibility
There are also some related issues for this.

2447049: Add a render filter to twig
Checking for empty fields in Twig templates is complicated