Fix `on` method to check arity.

Thanks to @soveran (github.com/soveran/clap) for the
general idea.