general purpose python data validator