acceptNumber(obj, isArray = true, allowBoolean = true) {
        // check error
        if (obj instanceof FormulaError)
            return obj;
        let number;

        if (typeof obj === 'number')
            number = obj;
        // TRUE -> 1, FALSE -> 0
        else if (typeof obj === 'boolean') {
            if (allowBoolean) {
                number = Number(obj);
            } else {
                throw FormulaError.VALUE;
            }
        }
        // "123" -> 123
        else if (typeof obj === 'string') {
            if (obj.length === 0) {
                throw FormulaError.VALUE;
            }
            number = Number(obj);
            // Note: the unique never-equal-to-itself characteristic of NaN
            if (number !== number) {
                throw FormulaError.VALUE;
            }
        } else if (Array.isArray(obj)) {
            if (!isArray) {
                // for range ref, only allow single column range ref
                if (obj[0].length === 1) {
                    number = this.acceptNumber(obj[0][0]);
                } else {
                    throw FormulaError.VALUE;
                }
            } else {
                number = this.acceptNumber(obj[0][0]);
            }

        } else {
            throw Error('Unknown type in FormulaHelpers.acceptNumber')
        }
        return number;
    }
@param obj
@param isArray - if it is an array: [1,2,3], will extract the first element
@param allowBoolean - Allow parse boolean into number
@returns {number|FormulaError}