templateCache definition undefined check.