Comparisons for enums + types conversion improvements (and few related fixes).