Fixed how as.period and as.duration handle NA objects. Fixed how divide_interval_by period handles NAs. Added tests. Fixes #167.