Fix handling of PeriodType when either years or months missing

Fixes #79