[FIX] avoid crashing if q['duration'] is None
Merge pull request #23 from gurneyalex/master

Sometimes crash with a TypeError in get_duration