Check if checkbox is null before accessing properties