Python Check If Something Is A Dictionary