Could you add a function to do all these plan node checks? In that way, you will save a lot lines like what we do currently.