inspect object properties if indexing fails
catch more exceptions, add test
collapse some lines
Merge pull request #155 from twilio/check-object-properties

Check object properties