diff --git a/lib/rapi/baserlib.py b/lib/rapi/baserlib.py
index 77dff33877ad725be9577e1e78a32cbda666f068..1daed10e2139b91f3a87b2ba62bea1165429f524 100644
--- a/lib/rapi/baserlib.py
+++ b/lib/rapi/baserlib.py
@@ -193,10 +193,13 @@ def FillOpcode(opcls, body, static, rename=None):
   @return: Opcode object
 
   """
-  CheckType(body, dict, "Body contents")
+  if body is None:
+    params = {}
+  else:
+    CheckType(body, dict, "Body contents")
 
-  # Make copy to be modified
-  params = body.copy()
+    # Make copy to be modified
+    params = body.copy()
 
   if rename:
     for old, new in rename.items():