Check for non-null data after response and use existing error ‘appleError’ if data is null. Otherwise, errors like “Could not connect to server” won’t be caught and jsonResponsefromData will crash the program.