How to fix app crash caused due to attemt of reading field from a null reference? : I am creating a sample app that sends notification to the driver when a rider requests pickup (like the uber app) I have a button for that functionality in the app.The app works fine and gets the driver but when i click on the button to call the driver the app crashes showing a nullpointerexception at   `if (response.body().success == 1) Toast.makeText(Home.this, "Request Failed!", Toast.LENGTH_SHORT).show();`

this is the code

    private void sendRequestToDriver(String driverId) {

        DatabaseReference tokens = FirebaseDatabase.getInstance().getReference(Common.token_tbl);

        tokens.orderByKey().equalTo(driverId)
                .addListenerForSingleValueEvent(new ValueEventListener() {
                    @Override
                    public void onDataChange(DataSnapshot dataSnapshot) {
                        for (DataSnapshot postSnapshot:dataSnapshot.getChildren())
                        {
                            Token token = postSnapshot.getValue(Token.class);

                            String json_lat_lng = new Gson().toJson(new LatLng(mLastLocation.getLatitude(),mLastLocation.getLongitude()));

                            Notification data = new Notification("SKYLAKE",json_lat_lng);
                            Sender content = null;
                            if (token != null) {
                                content = new Sender(token.getToken(),data);
                            }

                            mService.sendMessage(content)
                                    .enqueue(new Callback<FCMResponse>() {
                                        @Override
                                        public void onResponse(@NonNull Call<FCMResponse> call, Response<FCMResponse> response) {

                                            if (response.body().success == 1)
                                                Toast.makeText(Home.this, "Request Failed!", Toast.LENGTH_SHORT).show();
                                            else {
                                                Toast.makeText(Home.this, "Request Sent!", Toast.LENGTH_SHORT).show();
                                            }
                                        }

                                        @Override
                                        public void onFailure(Call<FCMResponse> call, Throwable t) {
                                            Log.e("ERROR",t.getMessage());

                                        }
                                    });
                        }
                    }

                    @Override
                    public void onCancelled(DatabaseError databaseError) {

                    }
                });
    }



the logcat shows `Attempt to read from field 'int com.joy.skylake.enlyftrider.Model.FCMResponse.success' on a null object reference`