public async Task <double?> GetTempratureAsync() { IThermometerReader thermometerReader = GetThermometerReader(); if (thermometerReader == null) { // Log error return(null); } // logDebug thermometerFound double?temperature = await thermometerReader.GetCurrentMeasurementAsync(); if (!temperature.HasValue) { // Log error } return(temperature); }