Referring to blank cells in function

I have a wave (imported data in csv format) that has blank cells at intervals and want to somehow fill them in with a smoothing function of some sort. In making the function, how do I examine a cell to see if it is blank?

Kind of like

IF wave0(2) = a number
THEN just copy the number into wave1(2)

IF wave0(2) is a blank cell
THEN take the average of wave0(1) and wave0(3) and insert it into wave1(2)
Hi,

is you imported the data into a numerical wave a missing value would be assigned NaN (not a Number). You cannot directly test for that condition because by definition comparing anything to NaN returns false. You can use numtype(num) though where a NaN returns a 2

wave0 = numtype(wave0[p])==2? (wave0[p-1]+wave0[p+1])/2 : wave0

result = test condition? true action : false action

The problem you will have is if you have a missing value at either the first or last point in the wave0 because either the [p-1] or the [p+1] will be out of the indexing range. You can wrap a test for the first and last point separately.
You can use Analysis->Interpolate to create an interpolated version of your wave. The interpolation ignores missing values.