Change type checks

Better speed
Fixes references to reserved keywords