Return null when a node doesn't have a template

Return null when a node doesn't have a template instead of a "object not
set to an instance of an object" exception. One case where this comes in handy is when on a cycle (menu, site map, etc) you only want to create anchors for nodes with templates associated, only checking if the TemplateAlias is null, instead of a try/catch.