Is the Nodata value of -99999 indicated in the source properties? Or is it known to you as the filler. Traditionally the value of Nodata will appear as Null and you will not get any information for the zones with the Null. If you have a different nodata value described in the source properties, but have values of -99999 in your raster that you recognize as Nodata. I would consider setting the Null value of -99999 if the ID button returns a value of -99999 when you select the raster nodata areas. The NoData should not be considered in the calculation of the mean.
I would follow the previous recommendation and set the -99999 values to Null which should prevent the calculation error.