Fix typerrors in latest version.

- The added WHEN fixes a bug where we would try to run `(insert NIL)`,
which obviously fails.

- The change to the defvar fixes a failing typecheck, somewhere, where a
  `wholenump` was expected.