Well yeah, but can't you just check for null?

Also, is ```$scope.system.environment.id``` ever null?  I would think it would be undefined until it was a string.