Fix crash when JSON response is nil