code: public PeriodType getPeriodType(Object object) {
          ReadablePeriod period = (ReadablePeriod) object;
          return period.getPeriodType();
      }
docs: Selects a suitable period type for the given object.
  
  @param object  the object to examine, must not be null
  @return the period type from the readable duration
  @throws NullPointerException if the object is null
  @throws ClassCastException if the object is an invalid type