Handle null data

Hi again, 

I've made the directive handle null data and not triggering unnecessary scope refresh.

BR
/Sebastian