update isNumber function