Providing some checking on reset

This avoid some issues when the plugin is destroyed but the `template` is `null`