title: Error when send a notification with FireBase Android
body: <p>I try to follow this tutorial <a href="http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/" rel="nofollow">http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/</a></p>
  
  <p>In class named MyFireBaseMessaging this method:</p>
  
  <pre><code>private void handleDataMessage(JSONObject json) {
          Log.e(TAG, "push json: " + json.toString());
  
          try {
              JSONObject data = json.getJSONObject("data");
  
              title = data.getString("title");
              message = data.getString("message");
              isBackground = data.getBoolean("is_background");
              imageUrl = data.getString("image");
              timestamp = data.getString("timestamp");
              payload = data.getJSONObject("payload");
  
              Log.e(TAG, "title: " + title);
              Log.e(TAG, "message: " + message);
              Log.e(TAG, "isBackground: " + isBackground);
              Log.e(TAG, "payload: " + payload.toString());
              Log.e(TAG, "imageUrl: " + imageUrl);
              Log.e(TAG, "timestamp: " + timestamp);
  
  
              if (!NotificationUtilities.isAppIsInBackground(getApplicationContext())) {
                  // pusho il messaggio se l'app è in attiva
                  Intent pushNotification = new Intent(Config.PUSH_NOTIFICATION);
                  pushNotification.putExtra("message", message);
                  LocalBroadcastManager.getInstance(this).sendBroadcast(pushNotification);
  
                  // avvio il suono di notifica
                  NotificationUtilities notificationUtilities =
                          new NotificationUtilities(getApplicationContext());
                  notificationUtilities.playNotificationSound();
              } else {
                  // se l'app è in background, visualizzo la notifica nello spazio notifiche
                  Intent resultIntent = new Intent(getApplicationContext(), MainActivity.class);
                  resultIntent.putExtra("message", message);
  
                  // verifico se ho un immagine da visualizzare
                  if (TextUtils.isEmpty(imageUrl)) {
                      showNotificationMessage(getApplicationContext(), title, message, timestamp,
                              resultIntent);
                  } else {
                      // se ho un immagine la visualizzo col messaggio
                      showNotificationMessageWithBigImage(getApplicationContext(), title, message,
                              timestamp, resultIntent, imageUrl);
                  }
              }
          } catch (JSONException e) {
              Log.e(TAG, "Json Exception: " + e.getMessage());
          } catch (Exception e) {
              Log.e(TAG, "Handle Exception: " + e.getMessage());
          }
      }
  </code></pre>
  
  <p>When my app is in background I do not receive notifications but in the log I can see this message: "Attempt to invoke interface method 'boolean java.util.List.add(java.lang.Object)' on a null object reference" by second catch
  I send message from PHP Backend like the tutorial,how could I solve?
  Thanks for helping me!</p>