Fix toValue not properly converting type aliases

This fixes #61