Why not change soy.$$escapeHtml and the other escaping directive so
that it returns '' given null?
I am opposed to undefined values printing as an empty string.
Currently when one of my templates outputs an undefined value I get a
template error - which is very helpful for catching bugs when I did
not intend for that value to be undefined.
You can shorten the explicit undefined check on a value slightly by
using the ternary operator:
<input value="{$foo ? $foo : ''}" />