Cast empty string to nil in enum