fixing NPE and removeAllPushNotificationsForDeviceRegistrationId issue