added extra check if json is invalid

done for [AGIOS-315](https://issues.jboss.org/browse/AGIOS-315)

@corinnekrych mind to have a look?



an extra quote to remove 
/expectationWithDescription("'request with valid JSON data");/expectationWithDescription("request with valid JSON data");