Density fluctuation as a measure of the tipping point in Ising-type ecosystems