private function checkDefaultType(\Closure $isCorrectType, string $expectedType)
    {
        if (!$isCorrectType()) {
            throw new \LogicException(
                    'Default value is not of type ' . $expectedType
                    . ' but of type ' . typeOf($this->default)
            );
        }
    }