Updated input validity check

Fixes billysbilling/billy-webapp#342
Fixes #1
Fixes #2