protected function processSize($size)
    {
        if ($size === null) {
            return $size;
        }

        $size = (int)$size;
        if ($size <= 0) {
            throw new InvalidArgumentException('Size has to be larger than 0');
        }

        return (int)$size;
    }