BuildObject now properly handles enums