Sanity check of buttons length before calling indexes

My use case is that enabling/disabling handlers can be done from UI by users in [Leaflet.Storage](https://github.com/yohanboniface/Leaflet.Storage) (demo [here](http://umap.fluv.io/)), so one can disable all the handlers.
I also can do some checks on my side, but: 1. I think this sanity check doesn't cost; 2. I'm using the container even if no handler is enabled.

Thanks!

Yohan