switch, scope.events != null to scope.events? , equates to the same thing