Avoid using Javascript Function typecheck in AngularJS application | CAST Appmarq