deque: check for nullptr in clear too