Add a type-mismatch error to give more detail when the JSON is invalid because of the wrong type.
Merge pull request #89 from j-h-a/improve-error-checking

Add a type-mismatch error to give more detail when the JSON is invalid because of the wrong type.