AmI right in assuming this is this defensive to handle the case when a user clicks "add" without having actually chosen a document? If so, :thumbsup: