_argsMatchTypes(args, types) {
        if (args.length !== types.length) return false;

        return _.every(args, (arg, i) => {
            const type = types[i];

            if (type === '*') return true;
            if (type === 'nil') return _.isNil(arg);
            if (type === 'string') return typeof arg === "string";
            if (type === 'boolean') return typeof arg === "boolean";
            if (type === 'number') return typeof arg === "number";
            if (type === 'integer') return typeof arg === "number" && _.isInteger(arg);
            if (type === 'function') return typeof arg === "function";
            if (type === 'array') return Array.isArray(arg);
            if (type === 'date') return arg && arg.constructor === Date;
            if (type === 'object') return arg && arg.constructor === Object;
            if (arg && arg.constructor && arg.constructor.name === type) return true;

            throw new Error(`Unknown type: ${type}`);
        });
    }
Check if the arguments match the given types.
@param {Arguments} args - The arguments.
@param {Array.<string>} types - The types.
@returns {boolean} True if matches, false otherwise.
@throws {Error} Throws if unknown type.
@private