If NAs in the input data lead to the power of the spectrum coming back as NA, the output value of Tp (peak period) will be numeric(0) unless we handle that special case and make the output NA. This provides consistency with the other outputs that show up as NA.