diff --git a/openapi_core/casting/schemas/casters.py b/openapi_core/casting/schemas/casters.py
index 94df492b..55022dc7 100644
--- a/openapi_core/casting/schemas/casters.py
+++ b/openapi_core/casting/schemas/casters.py
@@ -74,7 +74,10 @@ def validate(self, value: Any) -> None:
         if isinstance(value, bool):
             return
 
-        if value.lower() not in ["false", "true"]:
+        if (
+            not isinstance(value, (str, bytes)) or
+            value.lower() not in ["false", "true"]
+        ):
             raise ValueError("not a boolean format")