Checking if template is not null