[template] Update Template.render() to support types
[template] Update tests