[FIX] avoid crashing if q['duration'] is None