Scala Enumeration - retrieve value based on name

Hi,
I am new to scala. I am working with Enumeration. I need a usecase to check the given Enum name exists in my enumeration class. If yes, it need to return the value of the respective enum. I took a look at withName method . But, there we are iterating over the values available and returning the value if it exists. Could you please let know the method to get the name of the Enumeration by any means.

object GenericEntityIndexEnum extends Enumeration {

type GenericEntityIndexEnum = Value
val NAME = Value(“Name of the person”)
val AGE = Value(“Age of the person”)
val GENDER = Value(“Gender.”)
val EMAIL = Value(“Email.”)
val PHONE = Value(“Phone.”)
}

If I do, GenericEntityIndexEnum.withName("AGE ") -> it throws java.util.NoSuchElementException: No value found for 'AGE '.

When I saw the documentation of withName method, we are iterating over values and return the value if present.

Could you please help in the using the method, where if I pass the Enum name, it need to provided the value if present, else null.
Ex: GenericEntityIndexEnum.withName(“GENDER”) -

if name present , returns Gender(value of the enum variable). Else, returns null.

scala 2.13.3> GenericEntityIndexEnum.withName("Name of the person")
val res3: GenericEntityIndexEnum.Value = Name of the person