data validation to avoid saving `undefined` icons