If statement for jinja2