public function filter($value)
    {
        if ($value === null) {
            return $value;
        }

        if ($this->characters === null) {
            return trim($value);
        }

        return trim($value, $this->characters);
    }