function isIntegerKey(val) {
    if (typeof val === "string") {
        var num = Number(val);
        return isSafeInteger(num) && String(num) === val;
    }
    return isSafeInteger(val);
}
Return true if argument is a number or can be cast to a number which
roundtrips to the same string.