Check for non-null data after response

Check for non-null data after response and use existing error if data is null. This catches errors like “Could not connect to server” and prevents jsonResponsefromData from crashing on a null argument