public function length()
    {
        if ($this->isNull() || (is_string($this->value) && strlen($this->value) === 0)) {
            return 0;
        }

        if (is_string($this->value)) {
            return strlen($this->value);
        }

        return strlen(current($this->value));
    }