try-except in resolve for speed
replace map with list comprehension

In [20]: timeit tuple(map(type, args))
1000000 loops, best of 3: 416 ns per loop

In [21]: timeit tuple([type(arg) for arg in args])
1000000 loops, best of 3: 355 ns per loop