Periksa apakah niat memiliki ekstra

Intent intent = getIntent();

if (intent.hasExtra("bookUrl")) {
    bookUrl = b.getString("bookUrl");
} else {
   // Do something else
}
Dropout Programmer