Extract method for checking bases classes