#2968 introduced a reflection-based implementation to assert that a `Class` instance is a record. We should replace such an implementation with the built-in `Class::isRecord`.