diff --git a/lib/ht.py b/lib/ht.py
index 4e517101b2061b95829764f0630513878a791640..57dcdcaf2a005939c250ed9200945317bdde8be7 100644
--- a/lib/ht.py
+++ b/lib/ht.py
@@ -163,14 +163,14 @@ def TMap(fn, test):
 #: a non-empty string
 TNonEmptyString = TAnd(TString, TTrue)
 
-
 #: a maybe non-empty string
 TMaybeString = TOr(TNonEmptyString, TNone)
 
-
 #: a maybe boolean (bool or none)
 TMaybeBool = TOr(TBool, TNone)
 
+#: Maybe a dictionary (dict or None)
+TMaybeDict = TOr(TDict, TNone)
 
 #: a positive integer
 TPositiveInt = TAnd(TInt, lambda v: v >= 0)
diff --git a/lib/opcodes.py b/lib/opcodes.py
index ef20a72dda6d2be21d9bf96ecbfe7a48fe5a25cc..288f2e5a7056392ed8e4e65fb5b8e92e6548ab7b 100644
--- a/lib/opcodes.py
+++ b/lib/opcodes.py
@@ -533,8 +533,8 @@ class OpClusterSetParams(OpCode):
     ("remove_uids", None, ht.NoType),
     ("maintain_node_health", None, ht.TMaybeBool),
     ("prealloc_wipe_disks", None, ht.TMaybeBool),
-    ("nicparams", None, ht.TOr(ht.TDict, ht.TNone)),
-    ("ndparams", None, ht.TOr(ht.TDict, ht.TNone)),
+    ("nicparams", None, ht.TMaybeDict),
+    ("ndparams", None, ht.TMaybeDict),
     ("drbd_helper", None, ht.TOr(ht.TString, ht.TNone)),
     ("default_iallocator", None, ht.TOr(ht.TString, ht.TNone)),
     ("master_netdev", None, ht.TOr(ht.TString, ht.TNone)),
@@ -649,7 +649,7 @@ class OpNodeAdd(OpCode):
     ("group", None, ht.TMaybeString),
     ("master_capable", None, ht.TMaybeBool),
     ("vm_capable", None, ht.TMaybeBool),
-    ("ndparams", None, ht.TOr(ht.TDict, ht.TNone)),
+    ("ndparams", None, ht.TMaybeDict),
     ]
 
 
@@ -714,7 +714,7 @@ class OpNodeSetParams(OpCode):
     ("master_capable", None, ht.TMaybeBool),
     ("vm_capable", None, ht.TMaybeBool),
     ("secondary_ip", None, ht.TMaybeString),
-    ("ndparams", None, ht.TOr(ht.TDict, ht.TNone)),
+    ("ndparams", None, ht.TMaybeDict),
     ("powered", None, ht.TMaybeBool),
     ]
 
@@ -803,7 +803,7 @@ class OpInstanceReinstall(OpCode):
     _PInstanceName,
     ("os_type", None, ht.TMaybeString),
     ("force_variant", False, ht.TBool),
-    ("osparams", None, ht.TOr(ht.TDict, ht.TNone)),
+    ("osparams", None, ht.TMaybeDict),
     ]
 
 
@@ -985,7 +985,7 @@ class OpInstanceSetParams(OpCode):
     ("remote_node", None, ht.TMaybeString),
     ("os_name", None, ht.TMaybeString),
     ("force_variant", False, ht.TBool),
-    ("osparams", None, ht.TOr(ht.TDict, ht.TNone)),
+    ("osparams", None, ht.TMaybeDict),
     ]
 
 
@@ -1007,7 +1007,7 @@ class OpGroupAdd(OpCode):
   OP_DSC_FIELD = "group_name"
   OP_PARAMS = [
     _PGroupName,
-    ("ndparams", None, ht.TOr(ht.TDict, ht.TNone)),
+    ("ndparams", None, ht.TMaybeDict),
     ("alloc_policy", None,
      ht.TOr(ht.TNone, ht.TElemOf(constants.VALID_ALLOC_POLICIES))),
     ]
@@ -1036,7 +1036,7 @@ class OpGroupSetParams(OpCode):
   OP_DSC_FIELD = "group_name"
   OP_PARAMS = [
     _PGroupName,
-    ("ndparams", None, ht.TOr(ht.TDict, ht.TNone)),
+    ("ndparams", None, ht.TMaybeDict),
     ("alloc_policy", None, ht.TOr(ht.TNone,
                                   ht.TElemOf(constants.VALID_ALLOC_POLICIES))),
     ]