private function throwUnlessCorrectSubclass($property, $value)
    {
        $typeUsedToBe = $this->getTypeUsedToBe($property);

        if ($typeUsedToBe === "object") {
            $classUsedToBe = $this->getClassUsedToBe($property);

            if (!is_subclass_of($value, $classUsedToBe)) {
                throw new Exception();
            }
        }
    }