Fixes issues with orphaned referenced docs

* If a referenced doc does not exist any more, module was still returning
  the objectId. This is not meaningful, and the returned value is now None.
* In dereferenced lists of assets, the above return value is checked, so that
  only existing assets are returned. This logic is restricted to only assets,
  since lists may have null values in other conditions.