added try catch for response json check