Checks that the `error` field is really and `error` type.
Merge pull request #40 from aybabtme/assert-type-avoid-panics

Checks that the `error` field is really of `error` type.