check for existing values in types
tiniest speed improvement, maybe
new version