diff --git a/tree/dataframe/inc/ROOT/RDF/InterfaceUtils.hxx b/tree/dataframe/inc/ROOT/RDF/InterfaceUtils.hxx
index 3b8d8b76e28eaff8a2444441c3a36602354a36a3..4a971041ef8b7fcedd08d73e500e51d89eb8b88a 100644
--- a/tree/dataframe/inc/ROOT/RDF/InterfaceUtils.hxx
+++ b/tree/dataframe/inc/ROOT/RDF/InterfaceUtils.hxx
@@ -265,7 +265,8 @@ template <typename Filter>
 void CheckFilter(Filter &)
 {
    using FilterRet_t = typename RDF::CallableTraits<Filter>::ret_type;
-   static_assert(std::is_same<FilterRet_t, bool>::value, "filter functions must return a bool");
+   static_assert(std::is_convertible<FilterRet_t, bool>::value,
+                 "filter expression returns a type that is not convertible to bool");
 }
 
 void CheckCustomColumn(std::string_view definedCol, TTree *treePtr, const ColumnNames_t &customCols,
diff --git a/tree/dataframe/test/dataframe_simple.cxx b/tree/dataframe/test/dataframe_simple.cxx
index 6cadccc01f72368bc9f2cd2eb25a5aecab57d10b..5e014afd7250ffe776cb5feae1b59976106a4116 100644
--- a/tree/dataframe/test/dataframe_simple.cxx
+++ b/tree/dataframe/test/dataframe_simple.cxx
@@ -399,7 +399,7 @@ TEST_P(RDFSimpleTests, Define_Multiple)
 TEST_P(RDFSimpleTests, Define_Multiple_Filter)
 {
    RDataFrame tdf(3);
-   auto notFilteringFilter = [](int b1) { return b1 > 0; };
+   auto notFilteringFilter = [](int b1) { return b1; }; // also tests returning a type convertible to bool
    auto filteringFilter = [](int b2) { return b2 < 1; };
 
    auto root = tdf.Define("root", "0");