Determine main menu item on front page updating menu--main.html.twig
To get the path from item.url you would have to use the method toString():

  {{ item.url.tostring }}


Instead of comparing strings a better approach might be to check for the route name of the frontpage:

  {% if item.url.routed and item.url.routename == '&lt;front&gt;' %}
    &lt;em&gt;Front Page&lt;/em&gt;
  {% endif %}