IPCK-463: check for null document references before attempting to clone

git-svn-id: http://anonsvn.icesoft.org/repo/icefaces3/trunk/icefaces@36382 1de00972-ac04-4911-a46b-06793c8d78d9