Issue #3108006 by mondrake, ravi.shankar, longwave: Replace assertInternalType() calls with dedicated methods