There is a simpler way: ``type="{{ type|default('button') }}"``