RNA warning on EnumProperty

I create some lists using EnumProperty. The lists may be empty, because nothing in the lists. Therefore, I get some warning in the console. "RNA Warning: Current value "0" matches no enum in......." How to get rid of the warning in the console? I don't want to add some "NONE" in the lists when the lists are empty.

• AFAIK enum props are expected to have at least one element. Are they dynamic enums? what is the issue with having a dummy 'NONE' enum when empty? May 25 '18 at 16:23
• Yes, they are dynamic enums. I am using an add-on makehuman. They also have the enums, but they don't show rna warning when the enums are empty. I don't know why my code have rna warning. @batFINGER May 25 '18 at 16:59
• Do you have any UI code accessing the empty enums? May 25 '18 at 17:07
• Yes. I create some buttons to import the object on the list. @batFINGER May 25 '18 at 19:10

You can avoid this problem by adding a dummy to the list e.g. 'NONE' which will be used if there is nothing else to draw. This way you can also detect if the list is actually drawn/used for the UI:
("NONE", "None", "", 1),