cacheHits: add a check for undefined