Attempt to invoke virtual method 'java.lang.String java.lang.String.toString()' on a null object reference

I am trying to add a new crime after getting to page 285 of the 3rd edition of Android Programming and I am getting the error below:

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toString()' on a null object reference
at com.bignerdranch.android.criminalintent.CrimeLab.getContentValues(CrimeLab.java:103)
at com.bignerdranch.android.criminalintent.CrimeLab.addCrime(CrimeLab.java:41)
at com.bignerdranch.android.criminalintent.CrimeListFragment.onOptionsItemSelected(CrimeListFragment.java:85)
at android.support.v4.app.Fragment.performOptionsItemSelected(Fragment.java:2317)

The error occurs on this line:

values.put(CrimeTable.Cols.TITLE, crime.getTitle().toString());

I must have typed something wrong but I cannot figure out where. Does the error description give any indication as to what I did wrong? How do I make sure that a newly created crime object is not filled with nulls, or at least not make the application crash when trying to read a new crime object?

Thank you.

I am getting the same error.Have you found the solution?
Please reply.Thanks in advance

Remove the .toString() from crime.getTitle().toString(). I also did the same mistake.Hope it helps

I ended up using the sample code for that chapter supplied by BNR.

Hey My Name is Ellie White, i have completed my java training program from SynergisticIT recently.
The array in your ArrayAdapter contains at least one entry that is null. There must be no nulls there.

The array is populated in getDiaryDBDataList() so the problem is also there.