Actually, if you add this condition, you don't really need to check if ```duration``` is undefined before passing it into ```parseFloat()```, because
```
parseFloat( undefined ) => NaN
parseFloat( "" ) => NaN
```