I'm getting a null reference exception when I try to run the program with this line of code

Code:
If DirectCast(Me.Controls("checkbox" & x), CheckBox).Checked Then