public function setRetryLimit($retryLimit = null)
    {
        if (! is_numeric($retryLimit) && ! is_null($retryLimit)) {
            throw new InvalidArgumentException('Retry limit must be a number or null.');
        }

        if (is_string($retryLimit)) {
            $retryLimit = (int) $retryLimit;
        }

        $this->retryLimit = $retryLimit;

        return $this;
    }