[bugfix] Fix #2: AttributeError: 'NoneType' object has no attribute 'keys'