Handle NULL pointers in list models

also resolves two runtime Qt warnings