Add "is defined" checks to test for issue reported in schmittjoh/twig.js#85