As noted in this GitHub discussion:
https://github.com/weather-gov/api/issues/168the "latest observation" for a station that is returned from the NWS API is not always a full METAR report. Those that are will have a rawMessage field and a non-empty cloudLayer.
The code currently doesn't check for this and the null result is written to the cache file.
I only tried this out when I saw the GitHub discussion. I don't have $useMetarAPI set true in my code.