Selective graphite `timeFunction` - apply only to non-null values. Any options?

Hi,

I have data-series that looks like this:

[
TS1, null
TS2, <VAL2>
....
TSn, null
]

I need to replace only nonNull values by the corresponding timestamp.

For example, the above dataseries should become:

[
TS1, null
TS2, TS2
....
TSn, null
]

Using timeFunction replaces the values indiscriminately, however, I only need to replace non-null values.

Thanks