This improves error message for situations when a non-class is checked w.r.t. an abstract base class.