I need to optimize this function for speed. It's doing a bunch of unnecessary wrapping. Creating publications takes a while, and I suspect it's because of these validation functions.