Aggregations on datasets drop data variables with dtype=bool
```
>>> xray.Dataset({'x': 1}).isnull().sum()
<xray.Dataset>
Dimensions:  ()
Coordinates:
    *empty*
Data variables:
    *empty*
```

This is a bug.

diff --git a/xray/core/dataset.py b/xray/core/dataset.py
index c25b1d3e0..75affd31e 100644
--- a/xray/core/dataset.py
+++ b/xray/core/dataset.py
@@ -1529,7 +1529,7 @@ class Dataset(Mapping, ImplementsDatasetReduce, AttrAccessMixin):
             reduce_dims = [dim for dim in var.dims if dim in dims]
             if reduce_dims or not var.dims:
                 if name not in self.coords:
-                    if not numeric_only or var.dtype.kind in 'ifc':
+                    if not numeric_only or var.dtype.kind in 'ifcb':
                         if len(reduce_dims) == var.ndim:
                             # prefer to aggregate over axis=None rather than
                             # axis=(0, 1) if they will be equivalent, because
diff --git a/xray/test/test_dataset.py b/xray/test/test_dataset.py
index 1cacff12e..2bb55c8fa 100644
--- a/xray/test/test_dataset.py
+++ b/xray/test/test_dataset.py
@@ -1497,6 +1497,12 @@ class TestDataset(TestCase):
         self.assertDatasetEqual(data1.mean(dim='dim1'),
                                 data2.mean(dim='dim1'))
 
+    def test_reduce_dtype_bool(self):
+        # regression test for GH342
+        expected = Dataset({'x': 1})
+        actual = Dataset({'x': True}).sum()
+        self.assertDatasetIdentical(expected, actual)
+
     def test_reduce_keep_attrs(self):
         data = create_test_data()
         _attrs = {'attr1': 'value1', 'attr2': 2929}
['xray/core/dataset.py', 'xray/test/test_dataset.py']