protected function checkAndReturn($candidate)
    {
        if (!is_object($candidate)) {
            throw new InvalidArgumentException('Only objects are supported not '.gettype($candidate));
        }

        $type = $this->getCandidateType();

        if ($candidate instanceof $type) {
            return $candidate;
        }

        $thisClass = get_class($this);

        throw new InvalidArgumentException("You can only add $type objects to this object. Or define another class via an allow property in $thisClass");
    }