make sure the duration is a number