Update tmpl.js

if the given object does not exist don't throw an error.