Invalid reference to a class which has been moved

Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>
CLOUDSTACK-5689: System vm creation on local storage fails for hyper-v. A
null pointer exception was getting generated when a VolumeTO object was
serialized to create an answer object. If a local storage is used the uri
field will be null. Added null checks for the same.