handle null data returned on error
handle null data in debug statement also
Merge pull request #15 from surespot/nulldata

handle null data returned on error