Arbitrary data structure validation for Javascript