diff --git a/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h b/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h
index 4457589..b3d08ec 100644
--- a/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h
+++ b/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h
@@ -396,25 +396,37 @@
 
     using ConstraintsChecker::CheckConstraintMinLength;
 
-    bool CheckConstraintMinLength(const char * _Nonnull itemName, NSString * _Nonnull current, uint64_t expected)
+    bool CheckConstraintMinLength(const char * _Nonnull itemName, NSString * _Nullable current, uint64_t expected)
     {
+        if (current == nil) {
+            return true;
+        }
         return CheckConstraintMinLength(itemName, [current length], expected);
     }
 
-    bool CheckConstraintMinLength(const char * _Nonnull itemName, NSArray * _Nonnull current, uint64_t expected)
+    bool CheckConstraintMinLength(const char * _Nonnull itemName, NSArray * _Nullable current, uint64_t expected)
     {
+        if (current == nil) {
+            return true;
+        }
         return CheckConstraintMinLength(itemName, [current count], expected);
     }
 
     using ConstraintsChecker::CheckConstraintMaxLength;
 
-    bool CheckConstraintMaxLength(const char * _Nonnull itemName, NSString * _Nonnull current, uint64_t expected)
+    bool CheckConstraintMaxLength(const char * _Nonnull itemName, NSString * _Nullable current, uint64_t expected)
     {
+        if (current == nil) {
+            return true;
+        }
         return CheckConstraintMaxLength(itemName, [current length], expected);
     }
 
-    bool CheckConstraintMaxLength(const char * _Nonnull itemName, NSArray * _Nonnull current, uint64_t expected)
+    bool CheckConstraintMaxLength(const char * _Nonnull itemName, NSArray * _Nullable current, uint64_t expected)
     {
+        if (current == nil) {
+            return true;
+        }
         return CheckConstraintMaxLength(itemName, [current count], expected);
     }
 
@@ -423,20 +435,29 @@
     // Used when the minValue is a saved variable, since ConstraintsChecker does
     // not expect Core Foundation types.
     template <typename T, std::enable_if_t<std::is_integral<T>::value && std::is_signed<T>::value, int> = 0>
-    bool CheckConstraintMinValue(const char * _Nonnull itemName, T current, const NSNumber * _Nonnull expected)
+    bool CheckConstraintMinValue(const char * _Nonnull itemName, T current, const NSNumber * _Nullable expected)
     {
+        if (expected == nil) {
+            return true;
+        }
         return ConstraintsChecker::CheckConstraintMinValue(itemName, current, [expected longLongValue]);
     }
 
     template <typename T, std::enable_if_t<std::is_integral<T>::value && !std::is_signed<T>::value, int> = 0>
-    bool CheckConstraintMinValue(const char * _Nonnull itemName, T current, const NSNumber * _Nonnull expected)
+    bool CheckConstraintMinValue(const char * _Nonnull itemName, T current, const NSNumber * _Nullable expected)
     {
+        if (expected == nil) {
+            return true;
+        }
         return ConstraintsChecker::CheckConstraintMinValue(itemName, current, [expected unsignedLongLongValue]);
     }
 
     template <typename T, std::enable_if_t<std::is_floating_point<T>::value, int> = 0>
-    bool CheckConstraintMinValue(const char * _Nonnull itemName, T current, const NSNumber * _Nonnull expected)
+    bool CheckConstraintMinValue(const char * _Nonnull itemName, T current, const NSNumber * _Nullable expected)
     {
+        if (expected == nil) {
+            return true;
+        }
         return ConstraintsChecker::CheckConstraintMinValue(itemName, current, [expected doubleValue]);
     }
 
@@ -445,20 +466,29 @@
     // Used when the maxValue is a saved variable, since ConstraintsChecker does
     // not expect Core Foundation types.
     template <typename T, std::enable_if_t<std::is_integral<T>::value && std::is_signed<T>::value, int> = 0>
-    bool CheckConstraintMaxValue(const char * _Nonnull itemName, T current, const NSNumber * _Nonnull expected)
+    bool CheckConstraintMaxValue(const char * _Nonnull itemName, T current, const NSNumber * _Nullable expected)
     {
+        if (expected == nil) {
+            return true;
+        }
         return ConstraintsChecker::CheckConstraintMaxValue(itemName, current, [expected longLongValue]);
     }
 
     template <typename T, std::enable_if_t<std::is_integral<T>::value && !std::is_signed<T>::value, int> = 0>
-    bool CheckConstraintMaxValue(const char * _Nonnull itemName, T current, const NSNumber * _Nonnull expected)
+    bool CheckConstraintMaxValue(const char * _Nonnull itemName, T current, const NSNumber * _Nullable expected)
     {
+        if (expected == nil) {
+            return true;
+        }
         return ConstraintsChecker::CheckConstraintMaxValue(itemName, current, [expected unsignedLongLongValue]);
     }
 
     template <typename T, std::enable_if_t<std::is_floating_point<T>::value, int> = 0>
-    bool CheckConstraintMaxValue(const char * _Nonnull itemName, T current, const NSNumber * _Nonnull expected)
+    bool CheckConstraintMaxValue(const char * _Nonnull itemName, T current, const NSNumber * _Nullable expected)
     {
+        if (expected == nil) {
+            return true;
+        }
         return ConstraintsChecker::CheckConstraintMaxValue(itemName, current, [expected doubleValue]);
     }
 
