Fix for NPE when null enumeration is returned