[#3028] Added check that duration cannot be an empty string.