Preventing NPE when converting Enumerator into List