Better base class resolving and validity checks.