kernclass: don't deref. NULL on empty chooser input

Fixes #1619.

r? @frank-trampe