sort types.
Create a test to make sure types are sorted.