protected function valueIsChainable($value): bool
    {
        $chainableObjects = $this->getChainableObjects();
        if (! is_object($value)) {
            return false;
        } elseif (in_array('object', $chainableObjects)) {
            return true;
        } else {
            $isInstanceOf = function (string $chainable) use ($value) {
                return $value instanceof $chainable;
            };
            return count(array_filter($chainableObjects, $isInstanceOf)) !== 0;
        }
    }