Add assertion error types

  These are error types which will be used by the identity type.
Add implementation for the previously added error types.