protected function assertValidDisk($disk)
    {
        $translator = $this->translator();

        if ($disk === null) {
            $message = $translator->translate(
                'Default filesystem [{{ defaultFilesystemConnection }}] is not defined',
                [
                    '{{ defaultFilesystemConnection }}' => 'config.filesystem.default_connection'
                ]
            );

            throw new InvalidArgumentException($message, 400);
        }

        if (!is_string($disk)) {
            $actualType = is_object($disk) ? get_class($disk) : gettype($disk);
            $message = $translator->translate(
                '{{ parameter }} must be a {{ expectedType }}, received {{ actualType }}',
                [
                    '{{ parameter }}'    => '"disk"',
                    '{{ expectedType }}' => 'string',
                    '{{ actualType }}'   => $actualType,
                ]
            );

            throw new InvalidArgumentException($message, 400);
        }

        if (!isset($this->filesystems[$disk])) {
            $message = $translator->translate('Filesystem identifier "{{ fsIdent }}" is not defined.', [
                '{{ fsIdent }}' => $disk
            ]);

            throw new InvalidArgumentException($message, 400);
        }
    }