It's rather pointless to replace something with NULL when you can more simply use $remove().