Add null case for deepCopy