energy_measurement: Check for failure of Instrument::get_data
energy_measurement: Check for failure of Instrument::get_data

Devlib's get_data API can return None when something goes wrong -
this currently results in us attempting to add a non-existent
artifact.

To avoid this confusion, check and use the return value from
get_data, instead of assuming that it will write data to its
'outfile' parameter.

setrofim/workload-automation,lisatn/workload-automation,lisatn/workload-automation,lisatn/workload-automation,ARM-software/workload-automation,ARM-software/workload-automation,setrofim/workload-automation,lisatn/workload-automation,setrofim/workload-automation,setrofim/workload-automation,ARM-software/workload-automation,ARM-software/workload-automation