use filter function of d3.js in order to not create empty text elements