Use Jinja's Template Tests

I was getting a `UndefinedError` with a value of `'type' is undefined` when using django-nvd3.

Using Jinja's Template Tests prevents this.