check in template if jinja2 has default value code example
Example: jinja check if variable is none
{% if p is none %}
<!--None-->
{% else %}
<!--Not None-->
{%endif %}
{% if p is none %}
<!--None-->
{% else %}
<!--Not None-->
{%endif %}