break out proxy command validation code into it's own function (no functional change)