Code:
ToggleWarlockCheckbox:SetScript("OnClick", CheckBox_OnClick)
While there are possible possabilities, the
CheckBox_OnClick function from the line above doesn't seem to exist in the code you posted. You might be updating another addon or something in the Blizzard UI with the code as it stands.
If you do have a function called
CheckBox_OnClick somewhere and it's global then, being such a generic name, it might have been overwritten by another addon that accidently included a global function called
CheckBox_OnClick so, same result as above.