added check for template data in underscore template