Handle non-boolean additionalProperties
Handle definitions and better error handling