null checks in the sample onRewardsReceived