Taken from lodash isString implementation