A generic helper to validate an enum value from a lookup object.
The value to check.
The object containing valid enum values (e.g., VIEWPORT_SHADE_PLOT).
The value to return if the input is invalid.
A generic helper to validate an enum value from a lookup object.