Add null check on DeleteRecursive()