Validate AdvEnum & return an InvalidInput on error

Raise a relevant exception of InvalidInput while validating if
the input to AdvEnum is not one of what is expected.

Closes-bug: #1320430
Change-Id: I48f014cc09e7d88e9b0f02fb8e9cf45772178b2c
Merge "Validate AdvEnum & return an InvalidInput on error"