Fix NullPointerException

1. Forgot to verify that a ToggleButton's button list actually has buttons before removing.