[python] Python: Checking if a 'Dictionary' is empty doesn't seem to work