null check in ClassInstance.copyReferredObjectsTo()