This fixes a NPE when icon is resolved to null.