Require complete type when checking for the base class (Solves ROOT-6750)

Also reduce code duplication relate to require complete types.