The following function check if an object is defined and valorized:
isFullDefined(obj) => { return angular.isDefined(obj) && obj !== null &&a