Set device_data to {} if it is nil