Added null check for progressDialog in onDestroy