fix isNumber function bug