diff --git a/restic_volume_backup/containers.py b/restic_volume_backup/containers.py
index d2f2fc9..e53ed1e 100644
--- a/restic_volume_backup/containers.py
+++ b/restic_volume_backup/containers.py
@@ -132,6 +132,12 @@ class Container:
         return value.split(',')
 
     def __eq__(self, other):
+        if other is None:
+            return False
+
+        if not isinstance(other, Container):
+            return False
+
         return self.id == other.id
 
 
diff --git a/tests/tests.py b/tests/tests.py
index 5531bef..37d999e 100644
--- a/tests/tests.py
+++ b/tests/tests.py
@@ -79,6 +79,7 @@ class ResticBackupTests(unittest.TestCase):
             self.assertEqual(len(result.containers), 3, msg="Three containers expected")
             self.assertNotEqual(result.this_container, None, msg="No backup container found")
             web_service = result.get_service('web')
+            self.assertNotEqual(web_service, None)
             self.assertEqual(len(web_service.filter_mounts()), 1)
 
     def test_include(self):