more aggressive caching in isType

Also, minor fix for .e. Not sure what happened, the fix existed on my working branch but not on the branch I pull requested a few days back.