Prometheus does not store or return "null".
Prometheus will store a "staleness marker" when it performs a scrape and doesn't find a timeseries (i.e. metric+label set) which was present in the previous scrape. Internally, it's stored as a special kind of floating-point NaN. However it's not returned in queries. Instead, the timeseries just "disappears" as if it didn't exist.
A timeseries consists of a series of values V1, V2, V3 .. at timestamps T1, T2, T3 ... So when you perform an instant query for some arbitrary time T, then prometheus has to look back in time to find the nearest data point at or before time T. It will look back up to --query.lookback-delta (by default 5m), but if it finds a staleness marker, it just doesn't return any value, i.e. that timeseries is excluded from the vector result. This is all described
here.
If you want to look gaps in a particular timeseries, you can build a query using
absent(), giving a specific timeseries (metric+labels) that you're looking for, and prometheus will tell you when the time series doesn't exist (i.e. there is no data point within the previous 5 minutes *or* the series has been marked stale)
absent{foo{instance="bar",job="baz"})
If you want to see when arbitrary timeseries disappear, without hardcoding specific label sets, you can try something like this:
foo offset 5m unless foo # it existed 5 minutes ago, but doesn't exist now
present_over_time(foo[24h] offset 5m) unless foo # existed any time in the last 24 hours until 5 minutes ago, but doesn't exist now