DDF-416 Only add size if URI is present and valid.

As suggested by Jeff Vettraino and agreed by Shaun Morris on ddf-developers mailing list.