Checking conditions of a check box