common.checkResponse handles all the null response, non-200 and JSON.parse checking that I replace here.