def checktype(self, val, kind, **kargs):
if not isinstance(val, kind):<EOL><INDENT>raise TypeError('<STR_LIT>'.format(<EOL>self.str_kind(kind), self.str_valtype(val)))<EOL><DEDENT>
Raise TypeError if val does not satisfy kind.