KNOX-459 - added null checks to the closing of resultEnums to avoid NPEs