angular.isDefined checks whether variable is defined or not and if it is defined then return true otherwise return false. See the code snippet:
angular.isDefined