DataResource has a ```getSafeUri()```method, so the ```if else``` is not needed, just use ```getSafeUri().asString()``` for both