Fix `functions._getPercentile` by ignoring None values

`functions._getPercentile` was not ignoring `None` values. This patch fixes it.