Small change in logic for x$set

x$set using NULL for simper condition checking