Typecheck for angular.

Need to do a type check so that certain modal windows in Plone’s
editing interface continue to work. Only running the code when
necessary.