if type(v) is 'int':

じゃねえの?

==でも通る?やった事ないけど。