Experiencing Crashes in Android Development

I have a few users experiencing crashes (android app) to do with this line - rewardIcon = getResources().getResourceEntryName(icon);

Crashlytics shows this:

Fatal Exception: android.content.res.Resources$NotFoundException: Unable to find resource ID #0×0

at android.content.res.ResourcesImpl.getResourceEntryName(ResourcesImpl.java:318)

It’s working fine on a few devices I have tested but a few users get the resource not found error.
Any ideas on how to solve this?