title: NullPointerException while creating AsyncTask
body: <p>I have simple method with <code>AsyncTask</code>, but code suddenly crashed. Any ideas?
  I got <code>Could not parse malformed JSON:</code>, and now I get NPE at <code>new AsyncTask&lt;String, Void, String&gt;() {</code>
  My code:</p>
  
  <pre><code>private void getMyPage() {
          new AsyncTask&lt;String, Void, String&gt;() {
  
              ProgressDialog dialog = new ProgressDialog(UserProfileActivity.this);
  
              @Override
              protected void onPreExecute() {
                  super.onPreExecute();
                  Create Dialog...
              }
  
              @Override
              protected String doInBackground(String... params) {
                  HashMap&lt;String, String&gt; data = new HashMap&lt;&gt;();
  
                  data.put("token", params[0]);
  
                  LoginLectorUtils apiUtils = new LoginLectorUtils();
                  return apiUtils.sendPostRequestWithParams(REQUEST_URL, data);
              }
  
              @Override
              protected void onPostExecute(String response) {
                  super.onPostExecute(response);
                  dialog.dismiss();
  
                  if (!response.equalsIgnoreCase("error")) {
                      try {
                          final JSONObject jsonObject = new JSONObject(response);
  
                          if (jsonObject.getString("error").equals("true")) {
                              showDialogConnectionError();
                          } else if (jsonObject.getString("error").equalsIgnoreCase("false")) {
                              doLoadStuff(
                                      jsonObject.getString("name"),
                                      jsonObject.getString("phone")
                          }
  
                      } catch (Throwable t) {
                          Log.e("UserProfileActivity", "Could not parse malformed JSON: \"" + response + "\"");
                      }
                  } else {
  
                  }
              }
          }.execute(sharedPrefUtils.getToken());
      }
  </code></pre>