Use isinstance() over type()