(objectp(error) && error->error_type==MySpecialError.error_type) or (objectp(error) && error->is_my_special_error)
I assume that error could be several types at once, so the last one would probably work best, if there isn't any function X X(error,MySpecialError) that checks if the value of error fits into the type MySpecialError.