Like extractStat, this function returns null on error. I don't think it's critical to spell out in the function name, but could add comments to this effect.