public function hasItem($key)
    {
        if (isset($this->data[$key])) {
            
            /* @var $item \Psr6NullCache\CacheItem */
            $item = $this->data[$key];
            
            if ($item->isHit() === true && ($item->getExpires() === null || $item->getExpires() > new DateTime())) {
                return true;
            }
        }
        
        return false;
    }