title: NullPointerException in android AsyncTask in method innerSetException():
body: <p>In the app on which I a working I have a method called addVideo which gets called in the doInBackground method of an AsyncTask, which basically just adds a video to the media store and returns its uri:</p>
  
  <p></p>
  
  <pre><code> public Uri addVideo(File videoFile) {
      ContentValues values = new ContentValues(3);
      values.put(MediaStore.Video.Media.TITLE, "My Video!");
      values.put(MediaStore.Video.Media.MIME_TYPE, "video/mp4");
      values.put(MediaStore.Video.Media.DATA, videoFile.getAbsolutePath());
      return getContentResolver().insert(MediaStore.Video.Media.EXTERNAL_CONTENT_URI, values);
  }
  </code></pre>
  
  <p>I am currently getting an error on the line:
  <code>values.put(MediaStore.Video.Media.MIME_TYPE, "video/mp4");</code></p>
  
  <p>Here is the logcat:</p>
  
  <pre><code>java.lang.RuntimeException: An error occured while executing doInBackground()
  at android.os.AsyncTask$3.done(AsyncTask.java:200)
  at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
  at java.util.concurrent.FutureTask.setException(FutureTask.java:125)
  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308)
  at java.util.concurrent.FutureTask.run(FutureTask.java:138)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
  at java.lang.Thread.run(Thread.java:1019)
  Caused by: java.lang.NullPointerException
  at com.myProject.add_video_project.AddToMediaStore.addVideo(Submit.java:121)
  at com.myProject.add_video_project.AddToMediaStore$StartUploadChain.doInBackground(Submit.java:195)
  at com.myProject.add_video_project.AddToMediaStore$StartUploadChain.doInBackground(Submit.java:167)
  at android.os.AsyncTask$2.call(AsyncTask.java:185)
  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
  </code></pre>
  
  <p>Any ideas as to what might be going on? Thanks!</p>