replaced _.isUndefined for angular.isUndefined