Add validation for undefined duration for FF and IE9