Declaring is not enough. With declaring, your reserve a little bit of memory for that variable.
But you do not fill that variable. You do not assign that variable a valid checkbox. So it's null and you cannot work with it in your code (it gives an error because it's not assigned a checkbox object).