issue175 inputvalidation

Updated pull-request to implement validation in the input as #175 
You really don't want to be trapping a bare "Exception" (and this is Python 2 syntax, BTW). You should detect the errors you expect and deal with them (maybe by disabling validation, although that doesn't sound like the right answer to, for example, malformed JSON) and let the rest surface as exceptions to be reported as such to the user.