Fix to handle null data

- Adding check and handlers for null data responses
More fixes
Merge pull request #3 from joseeight/fixes

Fix to handle null/undefined data