public function setValue($value, $index = null)
    {
        if ($index === null) {
            $this->value = Arr::cast($value);
        }
        else {
            $this->value[$index] = $value;
        }
        return $this;
    }