Create checkedTypes.js

Replaces class2type for better performance and size.