Avoid using Javascript Object typecheck in AngularJS application | CAST Appmarq