make the cache null tolerant.