Python Check If Type Is Dictionary