Kiran | # 743 | Handled the case of template being empty in templates API.