```common lisp
(cl:in-package #:sicl-clos)

(eval-when (:compile-toplevel :load-toplevel :execute)
  (fmakunbound 'class-of))

(defun class-of (object)
  (heap-instance-class object))
```

Handle any CL object without error.
user
```common lisp
(cl:in-package #:sicl-clos)

(eval-when (:compile-toplevel :load-toplevel :execute)
  (fmakunbound 'class-of))

(defun class-of (object)
  (if (heap-instance-p object)
      (heap-instance-class object)
      (cdr (assoc t *classes*))))
```
assistant