diff --git a/pyopencl/__init__.py b/pyopencl/__init__.py
index 166601f27e038e641f0c35ac44c25b78e4b4d992..8bf931eda83ae6722ac67dde28a19cc576785679 100644
--- a/pyopencl/__init__.py
+++ b/pyopencl/__init__.py
@@ -1068,7 +1068,7 @@ def svm_empty(ctx, flags, shape, dtype, order="C", alignment=None):
         alignment = itemsize
 
     svm_alloc = SVMAllocation(ctx, nbytes, alignment, flags, _interface=interface)
-    return SVM(np.asarray(svm_alloc))
+    return np.asarray(svm_alloc)
 
 
 def svm_empty_like(ctx, flags, ary, alignment=None):
diff --git a/pyopencl/cffi_cl.py b/pyopencl/cffi_cl.py
index 31df8050007d787cebc813e6b0774312d7dd6a13..5893fc24b33f13aef44cd56674e46b88ecdfa44b 100644
--- a/pyopencl/cffi_cl.py
+++ b/pyopencl/cffi_cl.py
@@ -1660,7 +1660,7 @@ class Kernel(_Common):
                 status = _lib.kernel__set_arg_null(self.ptr, {arg_idx})
                 if status != _ffi.NULL:
                     _handle_error(status)
-            else:
+            elif isinstance({arg_var}, _cl._CLKernelArg):
                 self._set_arg_clkernelarg({arg_idx}, {arg_var})
             """
             .format(arg_idx=arg_idx, arg_var=arg_var))