private function freshOrNull(ClassMetadata $classMetadata = null)
    {
        if (null === $classMetadata) {
            return;
        }

        return $this->freshnessValidator->isFresh($classMetadata) ? $classMetadata : null;
    }