Safer handling when no json response is available