safety checks for template rendering during publish