Robert, I’m confused. Here you do exactly the thing you don’t like, right? How does that solve the issue? Or is it your goal to write a little convenience function?
The goal was mainly the convenience function. I found it annoying to have to redo this sort of logic over and over, so I wanted something to abstract it away. I don't believe there is a way to completely remove this process.