Fix compatibility with radio button plugins

Script assumed if it found something ":checked" that it was a checkbox which caused issues if using plugins that turn category checkboxes into radio buttons.

This just adds an extra check to avoid a JS error.