Better data input validation and error handling
Merge pull request #7 from hugoatease/master

Better data input validation and error handling