This looks wrong now. Probably should be replaced with `UnexpectedTypeException`.