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

(defun car (list)
  (declare (type list list))
  (if (consp list)
      (cleavir-primop:car list)
      nil))

(defun cdr (list)
  (declare (type list list))
  (if (consp list)
      (cleavir-primop:cdr list)
      nil))
  
(defun rplaca (cons object)
  (declare (type cons cons))
  (cleavir-primop:rplaca cons object)
  cons)

(defun rplacd (cons object)
  (declare (type cons cons))
  (cleavir-primop:rplacd cons object)
  cons)
```

Use explicit test for type of argument.
user
```common lisp
(cl:in-package #:sicl-cons)

(defun car (list)
  (if (consp list)
      (cleavir-primop:car list)
      (if (null list)
	  nil
	  (error 'must-be-list :datum list))))

(defun cdr (list)
  (if (consp list)
      (cleavir-primop:cdr list)
      (if (null list)
	  nil
	  (error 'must-be-list :datum list))))
  
(defun rplaca (cons object)
  (if (consp list)
      (progn (cleavir-primop:rplaca cons object) cons)
      (error 'must-be-cons cons)))

(defun rplacd (cons object)
  (if (consp list)
      (progn (cleavir-primop:rplacd cons object) cons)
      (error 'must-be-cons cons)))
```
assistant