[#2145] Improve QueryPartList.removeNulls() as this is called very often