is_template

The is_template filter accepts one string argument. The argument is the pathname of a HiFi theme template file relative to the templates directory. This will return true if the template exists, else false.

{% if "page/page.html"|is_template %}
    Yes
{% else %}
    No
{% endif %}