Errors handling in class checking