extract 'add emptyView' logic into helper and prevent unnecessary add/remove emptyView work