Check if a template is in use