Added validator for duration type and better converter for boolean