I found out that this is due to the IsScalarType method, which is not enumerated. This can be easily IsScalarType changing the IsScalarType method as follows:
private static bool IsScalarType(Type t) {
After that, the type of enumeration will also be recognized.
source share