Where are you expecting optional parameter name to be provided?
If you invoke the command interactively then name is nil, because your interactive spec doesn't give it a non-nil value.
Since name is ...
The argument of the interactive form can also be a sexp that evaluates to a list of argument values. In your case that list contains only the value of the NAME argument.
With this form of interactive ...
Emacs buffer switching made easy.
Wouldn't it be nice if emacs buffer switching worked like Firefox tab switching?
Never loose the existing order.
Control-PgUp/Dn to switch buffers ...