This current value could be simplified as String.
It is needed to write this value in external system (like log file which will be read by another program, or web API), and this external system probably not know this type value.
It is like serializing this value, but without that the external system can deserialize it. So the value should be simplified as String, to be generic.
Numerical values (like
bool) will be casted in String,
but external system should be able to detect them and cast them in its own
numerical system (if any).
See an example of implementation of
enum Level in
in source repository.