btremI have successfully used if foo is string, but I also tried if foo is sequence and got an error. I suspect because nunjucks is (to simplify things a bit) a javascript port of jinja, which was AIUI designed for Python. Python has sequences, js does not, hence the error.