fixed isString method bugs