angular.isUndefined  can be used.