allow to pass undefined value to template_replace