escape type names since they could be keywords
more test cases + fixes
Merge pull request #78 from onefinestay/escaping

escape type names since they could be keywords