public static function argsValidation($cacheDir, $cacheTTL, $caching,
                                          $cacheForever, $charset)
    {
        if (!self::validateDirName($cacheDir))
            throw new \Franzip\SerpFetcher\Exceptions\InvalidArgumentException('Invalid SerpFetcher $cacheDir: please supply a valid non-empty string.');

        if (!self::validateExpirationTime($cacheTTL))
            throw new \Franzip\SerpFetcher\Exceptions\InvalidArgumentException('Invalid SerpFetcher $cacheTTL: please supply a positive integer.');

        if (!self::validateCacheOpt($caching))
            throw new \Franzip\SerpFetcher\Exceptions\InvalidArgumentException('Invalid SerpFetcher $caching: please supply a boolean value.');

        if (!self::validateCacheOpt($cacheForever))
            throw new \Franzip\SerpFetcher\Exceptions\InvalidArgumentException('Invalid SerpFetcher $cacheForever: please supply a boolean value.');

        if (!self::validateCharset($charset))
            throw new \Franzip\SerpFetcher\Exceptions\InvalidArgumentException('Invalid SerpFetcher $charset: please supply a valid non-empty string.');
    }