Check templates are not undefined.