(when (null name) (return-from gtype-from-name nil))
(bt:with-lock-held (*gtype-lock*)
(let ((type (gethash name *name-to-gtype*)))
(when (null name) (return-from gtype-from-name nil))
(bt:with-lock-held (*gtype-lock*)
(let ((type (gethash name *name-to-gtype*)))
(when (zerop id) (return-from gtype-from-id nil))
(bt:with-lock-held (*gtype-lock*)
(let ((type (gethash id *id-to-gtype*)))
(when (zerop id) (return-from gtype-from-id nil))
(bt:with-lock-held (*gtype-lock*)
(let ((type (gethash id *id-to-gtype*)))