Updated input validity check

Fixes billysbilling/billy-webapp#342
Fixes #1
Fixes #2
Merge pull request #3 from billysbilling/input-validity

Updated input validity check