use our own isclass, which does not test for __bases__

more robust; less confusing errors