I got the following error in drupal:
Warning: Invalid argument supplied for foreach() in Drupal\Core\Render\Element\Checkboxes::valueCallback() (line 100 of core/lib/Drupal/Core/Render/Element/Checkboxes.php).
This is caused by a default value that is a string, and not an array.
Solution
Make the default item an array of values:
$form['item'] = array(
'#type' => 'checkboxes',
'#title' => 'Title'
'#options' => [1,3],
'#required' => TRUE,
'#default_value' => [1]
);