modified functions isAnumber and isString.