ProgressDialog no aparece en AsyncTask

Estoy creando una aplicación para Android que depende de los datos que la aplicación obtiene de la base de datos. Para obtener estos datos, tengo la siguiente clase (esta clase obtiene datos de la base de datos en json, los traduce y los devuelve):

public class Json {

public String jsonResult;

private Activity activity;
private String url = "http://json.example.org/json.php";
private String db, query;

public Json(Activity activity) {
    this.activity = activity;
}

public String accessWebService(String db, String query) {
    JsonReadTask task = new JsonReadTask();

    this.db = db;
    this.query = query;

    task.execute(new String[] { url });

    try {
        task.get();
    } catch (InterruptedException e) {
        Toast.makeText(activity.getApplicationContext(),
                "FATAL ERROR: The thread got interrupted", Toast.LENGTH_LONG).show();
    } catch (ExecutionException e) {
        Toast.makeText(activity.getApplicationContext(),
                "FATAL ERROR: The thread wasn't able to execute", Toast.LENGTH_LONG).show();
    }
    return jsonResult;
}

// Async Task to access the web
private class JsonReadTask extends AsyncTask<String, Void, String> {

    private final ProgressDialog dialog = new ProgressDialog(activity);

    protected String doInBackground(String... params) {
        HttpClient httpclient = new DefaultHttpClient();
        HttpPost httppost = new HttpPost(params[0]);
        try {
            // add post data
            List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
            nameValuePairs.add(new BasicNameValuePair("db", db));
            nameValuePairs.add(new BasicNameValuePair("query", query));
            httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
            HttpResponse response = httpclient.execute(httppost);
            jsonResult = inputStreamToString(response.getEntity().getContent()).toString();
            if (jsonResult.isEmpty()) {
                Toast.makeText(activity.getApplicationContext(),
                        "Error, connection is up but didn't receive data. That's strange...",
                        Toast.LENGTH_LONG).show();
                this.cancel(true);
            }

        } catch (ClientProtocolException e) {
            //Toast.makeText(activity.getApplicationContext(),
            //      "Error, Client Protocol Exception in JSON task",
            //      Toast.LENGTH_LONG).show();
            Log.i("Json", "Error, Client Protocol Exception in JSON task");
            this.cancel(true);
        } catch (IOException e) {
            //Toast.makeText(activity.getApplicationContext(),
            //      "Error, Please check your internet connection",
            //      Toast.LENGTH_LONG).show();
            Log.i("Json", "Error, Please check your internet connection");
            this.cancel(true);
        }
        return null;
    }

    private StringBuilder inputStreamToString(InputStream is) {
        String rLine = "";
        StringBuilder answer = new StringBuilder();
        BufferedReader rd = new BufferedReader(new InputStreamReader(is));

        try {
            while ((rLine = rd.readLine()) != null) {
                answer.append(rLine);
            }
        } catch (IOException e) {
            Toast.makeText(activity.getApplicationContext(), "Error..." + e.toString(),
                    Toast.LENGTH_LONG).show();
        }
        return answer;
    }


    }
}// end async task

}

Noté que mi aplicación se bloquea al acceder a la base de datos. Después de algunas búsquedas en Google, descubrí que era el método .get () en el método accessWebService () que causaba esto. Intenté implementar un progressDialog así (también eliminé el método .get ()):

private final ProgressDialog dialog = new ProgressDialog(activity);

    protected void onPreExecute() {
        super.onPreExecute();
        this.dialog.setMessage("Loading...");
        this.dialog.setCancelable(false);
        this.dialog.show();
    }

protected void onPostExecute(String result) {
            if (this.dialog.isShowing()) {
                this.dialog.dismiss();
            }
        }

pero el cuadro de diálogo no se mostró y obtuve NullPointerExceptions porque la aplicación solo funciona cuando hay datos:

result = json.accessWebService(db, query);

(Tal vez una cosa importante a mencionar: yo también uso este método en forloops)

Así que ahora mi pregunta es: ¿Cómo puedo cambiar mi aplicación para obtener un ProgressDialog mientras accedo a la base de datos y sin obtener NullPointerExceptions? Me temo que tengo que rearchitect mi aplicación completa y si tengo que hacer esto, ¿cómo hago esto? Espero que ustedes entiendan mi pregunta y tengan una solución para esto porque realmente necesito ayuda. Gracias por adelantado.

PD Lo siento si mi inglés no es tan bueno, no soy un hablante nativo.