Fixes #1: verification of validation structure cleaned up, also made it more generic (not 'json' specific)