isinstance is nicer than type(foo) == bar