BUG: fix isnull behavior when passed PeriodIndex with NaT (GH 9129)
PERF: use unique and isnull in nunique instead of value_counts.