diff --git a/include/caosdb/value.h b/include/caosdb/value.h
index 513ab33a006608625e2d52d0944839761db27278..989f780ed25a535fb34a97281f55e29c005a6c53 100644
--- a/include/caosdb/value.h
+++ b/include/caosdb/value.h
@@ -122,7 +122,7 @@ public:
   LIST_VALUE_CONSTRUCTOR(char *, set_string_value)
   LIST_VALUE_CONSTRUCTOR(bool, set_boolean_value)
 
-  [[nodiscard]] inline auto IsNull() -> bool {
+  [[nodiscard]] inline auto IsNull() const noexcept -> bool {
     return this->wrapped->value_case() == ValueCase::VALUE_NOT_SET;
   }
 
diff --git a/test/test_value.cpp b/test/test_value.cpp
index 0bbc645397ede57fcbcecb9243085f42120cbebb..74d30f04b621a0e118bc7591a07aab052786c790 100644
--- a/test/test_value.cpp
+++ b/test/test_value.cpp
@@ -65,6 +65,11 @@ TEST(test_value, test_string) {
   EXPECT_FALSE(empty_string.IsInteger());
 
   EXPECT_EQ(empty_string.AsString(), "");
+
+  // Test inequality
+  Value string1("1");
+  Value int1(1);
+  EXPECT_FALSE(string1 == int1);
 }
 
 TEST(test_value, test_double) {