Ensure device ID is defined