Simple type-validation for JSON data