A simple schema-based validator for Javascript objects