Using AngularJS helper functions angular.isFunction angular.isString