Fix toValue not properly converting type aliases