I thought about that, but I ended doing something a bit different.
I used this:
And did this:
self.props.columns[6].visible = any(value.getColumnAsList(value.getColumnIndex("VALUE2")))
So only I show it if there is something to show. A bit different approach than what I first thought. Also this only gets executed at the start of the view. So even if it's a bit inefficient is only done 1 time.