A little maintainability help for connectioin validation code