Added code to support registering custom user type for enums

Will this work if the criteria has multiple conditions that are based on enums?