if is U type, use this method to correct type
349769
void correctType(DialectSqlItem item) {//NOSONAR
		if (item.type == 'U') {// correct Unknown type to other type
			String valueStr = (String) item.value;
			String valueUpcase = valueStr.toUpperCase();
			// check is function
			String funPrefix = Dialect.getGlobalSqlFunctionPrefix();
			if (!StrUtils.isEmpty(valueUpcase)) {
				if (!StrUtils.isEmpty(funPrefix) && StrUtils.startsWithIgnoreCase(valueUpcase, funPrefix)
						&& functionMap.containsKey(valueUpcase.substring(funPrefix.length()))) {
					item.type = 'F';
					item.value = valueStr.substring(funPrefix.length());
				}

				if ((StrUtils.isEmpty(funPrefix) && functionMap.containsKey(valueUpcase))) {
					item.type = 'F';
					item.value = valueStr;
				}
			}
			if (item.type == 'U')// still not found
				if (",".equals(valueStr))
					// is Long able?
					item.setTypeAndValue(',', valueStr);
				else
					item.setTypeAndValue('S', valueStr);
		}
		if (item.subItems != null)
			for (DialectSqlItem t : item.subItems)
				correctType(t);
	}
427292
function isType(type, string) {
    if (isString(string) || isNumber(string)) {
        if (_regex.regex[type] && type !== 'default') {
            string = String(string);
            return _regex.regex[type].test(string);
        } else {
            throw Error('unknown type ' + type);
        }
    } else {
        throw Error('type should be string or number');
    }
}
280891
def is_uuid(u):
    """"""
    if isinstance(u, str) and u.replace('-', '') == uuid.UUID(u).hex:
        return u
    return False
224275
function isType(t, str) {
        // This function gets the type of `t`, typeof and instanceof are unreliable (typeof null === 'object')
        return Object.prototype.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase() === str;
    }
1131463
function checkTypeSelector(i) {
  if (i >= tokensLength) return 0;

  const start = i;
  let l;

  if (l = checkNamePrefix(i)) i += l;

  if (l = checkIdentOrInterpolation(i)) i += l;
  else return 0;

  return i - start;
}
1225062
public boolean isType(final String t) {
        final String dt = decode(t);
        if (dt.equals(getType())) {
            return true;
        }
        return "attribute".equals(getType())
                && dt.equalsIgnoreCase(getString());
    }
1064188
def ensure_unicode_string(value):
    """"""
    if not isinstance(value, six.string_types):
        raise TypeError(u'Expected string value, got: {}'.format(value))
    return six.text_type(value)
312447
private final static void ELCheckType(final Object obj, final Class<?> type) throws ELException {
	    if (String.class.equals(type)) {
	        ELSupport.coerceToString(obj);
        }
        if (ELArithmetic.isNumberType(type)) {
            ELSupport.coerceToNumber(obj, type);
        }
        if (Character.class.equals(type) || Character.TYPE == type) {
            ELSupport.coerceToCharacter(obj);
        }
        if (Boolean.class.equals(type) || Boolean.TYPE == type) {
            ELSupport.coerceToBoolean(obj);
        }
        if (type.isEnum()) {
            ELSupport.coerceToEnum(obj, type);
        }
	}
1301265
function isType(what, typeName) {
    "use strict";
    if (typeof typeName !== "string" || !typeName) {
        throw new CasperError("You must pass isType() a typeName string");
    }
    return betterTypeOf(what).toLowerCase() === typeName.toLowerCase();
}
1046945
function checkType(type, Type) {
  if (type && type !== Type.TYPE_NAME) {
    throw new Error(
      `Invalid type detected: ${type} while creating ${Type.name} instance`
    );
  }
}
909235
private static void validateTypes(byte[] types) {
        if (types == null) {
            throw new IllegalArgumentException("types is null");
        }
        for (int i = 0; i < types.length; ++i) {
            if (types[i] < TYPE_MIN || types[i] > TYPE_MAX) {
                throw new IllegalArgumentException("illegal type value at " + i + ": " + types[i]);
            }
        }
        for (int i = 0; i < types.length - 1; ++i) {
            if (types[i] == B) {
                throw new IllegalArgumentException("B type before end of paragraph at index: " + i);
            }
        }
    }
1147299
def _t(unistr, charset_from, charset_to):
    
    # if type(unistr) is str:
    #     try:
    #         unistr = unistr.decode('utf-8')
    #     # Python 3 returns AttributeError when .decode() is called on a str
    #     # This means it is already unicode.
    #     except AttributeError:
    #         pass
    # try:
    #     if type(unistr) is not unicode:
    #         return unistr
    # # Python 3 returns NameError because unicode is not a type.
    # except NameError:
    #     pass

    chars = []
    for c in unistr:
        idx = charset_from.find(c)
        chars.append(charset_to[idx] if idx!=-1 else c)
    return u''.join(chars)
182974
def _set_types(self):
        """"""
        # If we given something that is not an int or a float we raise
        # a RuntimeError as we do not want to have to guess if the given
        # input should be interpreted as an int or a float, for example the
        # interpretation of the string "1" vs the interpretation of the string
        # "1.0".
        for c in (self.x, self.y):
            if not ( isinstance(c, int) or isinstance(c, float) ):
                raise(RuntimeError('x, y coords should be int or float'))

        if isinstance(self.x, int) and isinstance(self.y, int):
            self._dtype = "int"
        else:
            # At least one value is a float so promote both to float.
            self.x = float(self.x)
            self.y = float(self.y)
            self._dtype = "float"
1215553
def check_input(self, obj):
        
        if isinstance(obj, str):
            return
        if isinstance(obj, unicode):
            return
        raise Exception("Unsupported class: " + self._input.__class__.__name__)
11841
function isForbiddenType(sType) {
				var aTypes = [ButtonType.Up, ButtonType.Back, ButtonType.Unstyled];
				return aTypes.indexOf(sType) !== -1;
			}
1276494
def is_string_type(type_):
    

    string_types = _get_types(Types.STRING)
    if is_typing_type(type_):
        return type_ in string_types or is_regex_type(type_)
    return type_ in string_types
1010143
def checktype(self, val, kind, **kargs):
        """"""
        if not isinstance(val, kind):
            raise TypeError('Expected {}; got {}'.format(
                            self.str_kind(kind), self.str_valtype(val)))