CMS-3633 TypeScript - Improve error handling in Admin Console

make use of api.ObjectHelper.iFrameSafeInstanceOf()
Merge pull request #785 from enonic/CMS-3633

CMS-3633 TypeScript - Improve error handling in Admin Console