fixed issue trying to copy nil objects to the pasteboard