I am trying to extract the pixel value from the last image of an image collection. The problem is that when I do so, I get an error stating the following:

[![Error printed after executing code.](https://i.stack.imgur.com/Q9Z0c.png)](https://i.stack.imgur.com/Q9Z0c.png)

This is my code for extracting the pixel value of the image:

```
var precipCol = imageCollection5.select(['hourlyPrecipRateGC'])
    .filterBounds(geometry)
    .filterDate(getFirst(new Date()), currentDate);

var lastPrecip = precipCol.reduce(ee.Reducer.last());

var precipNum = lastPrecip.reduceRegion(ee.Reducer.last(), geom)
    .getNumber('hourlyPrecipRateGC_last').getInfo();

```

When I click on the inspector tab, the code editor does display the number as it should. The value I get when I click in the inspector is what I need to get from the code above.

[![Inspector Tab Display](https://i.stack.imgur.com/utwQp.png)](https://i.stack.imgur.com/utwQp.png)

The variable **geometry** is a polygon consisting of the following vertices:

[![geometry var vertices](https://i.stack.imgur.com/GeBpY.png)](https://i.stack.imgur.com/GeBpY.png)

The variable **geom** is the coordinate: (-106.224911, 31.548092).

The variable **currentDate** holds a string with the current date in YYYY-MM-DD.

function **getFirst(date)** returns current week's first date.

**imageCollection5** is the following source:

[![source image collection](https://i.stack.imgur.com/Q69N1.png)](https://i.stack.imgur.com/Q69N1.png)

What can I do?