Prevent error when carousel is hidden by ngIf

When the carousel is hidden by ngIf the selector
tElement[0].querySelector('li') returns null causing the following
error:

TypeError: Cannot read property 'attributes' of null
    at
Object.compile
(http://localhost:9000/bower_components/angular-carousel/dist/angular-carousel.js:221:79)

at applyDirectivesToNode
(http://localhost:9000/bower_components/angular/angular.js:6473:32)

at compileNodes
(http://localhost:9000/bower_components/angular/angular.js:6043:15)

at compileNodes
(http://localhost:9000/bower_components/angular/angular.js:6055:15)

at compile
(http://localhost:9000/bower_components/angular/angular.js:5976:15)

at applyDirectivesToNode
(http://localhost:9000/bower_components/angular/angular.js:6386:33)

at compileNodes
(http://localhost:9000/bower_components/angular/angular.js:6043:15)

at compileNodes
(http://localhost:9000/bower_components/angular/angular.js:6055:15)

at compile
(http://localhost:9000/bower_components/angular/angular.js:5976:15)

at link
(http://localhost:9000/bower_components/angular-route/angular-route.js:903:18)
<ul class="notifications" rn-carousel=""
rn-carousel-index="notificationIndex" rn-carousel-buffered="">
Merge pull request #225 from samaxes/master

Prevent error when carousel is hidden by ngIf