user76158: void Sensor_value()
{   server.handleClient();
    humidity = dht.readHumidity();
    temperature = dht.readTemperature();     
 }

I want to make condition if temperature = null and Humidity= null that means the sensor fails to take reading so I want to return and take value again

user31105: The way to do this is:
float h = dht.readHumidity();
float t = dht.readTemperature();
float f = dht.readTemperature(true);

if (isnan(h) || isnan(t) || isnan(f)) {
  Serial.println("Failed to read from DHT sensor!");
  return;
}

See https://www.hackster.io/MisterBotBreak/how-to-use-temperature-and-humidity-dht-sensors-9e5975 and https://stackoverflow.com/questions/40874880/getting-nan-readings-from-dht-11-sensor.
NULL should only be used with pointers.

76158: <pre><code>void Sensor_value()
{   server.handleClient();
    humidity = dht.readHumidity();
    temperature = dht.readTemperature();     
 }
</code></pre>
<p>I want to make condition if temperature = null and Humidity= null that means the sensor fails to take reading so I want to return and take value again</p>
 31105: <p>The way to do this is:</p>
<pre><code>float h = dht.readHumidity();
float t = dht.readTemperature();
float f = dht.readTemperature(true);

if (isnan(h) || isnan(t) || isnan(f)) {
  Serial.println(&quot;Failed to read from DHT sensor!&quot;);
  return;
}
</code></pre>
<p>See <a href="https://www.hackster.io/MisterBotBreak/how-to-use-temperature-and-humidity-dht-sensors-9e5975" rel="nofollow noreferrer">https://www.hackster.io/MisterBotBreak/how-to-use-temperature-and-humidity-dht-sensors-9e5975</a> and <a href="https://stackoverflow.com/questions/40874880/getting-nan-readings-from-dht-11-sensor">https://stackoverflow.com/questions/40874880/getting-nan-readings-from-dht-11-sensor</a>.</p>
<p><code>NULL</code> should only be used with pointers.</p>
