public function isValid(array $validCodes = null)
    {
        if ($validCodes === null) {
            return $this->getHttpCode() === 200;
        }

        return in_array($this->getHttpCode(), $validCodes, true);
    }