Well this is probably neanderthal, but you can run all your curves through a line parameter component and then use the “clean tree” component to remove the null items… The line component will turn red, but you can just ignore that.
Otherwise a simple one line script in a vb, python or c# component could do it more elegantly.