[#7] Add unit tests for current failing case.
[#7] Fix failing cases by checking for AttributeError as well as KeyError.
Merge pull request #8 from 4degrees/7_attribute_error

7 attribute error