add better error handling for missing data
Merge pull request #26 from dimagi/error-handling

add better error handling for missing data