Declarative data structure validator for Javascript