To check how things work, sometimes is useful create a dataview table for tests purposes. For example, use this:
TABLE due, default(due, "") AS Test, default(due, date(2022-02-31)) AS "Test with date", default(due, "string") AS "Test with string"
FROM #project/active
WHERE file.name != "000 Domus"
SORT default(due, "") ASC
The function default(field, value) do this: «If field is null, return value ; otherwise return field».
With the expression SORT default(due, "") ASC we do this: if due is null, return nothing (""). You can use other things: strings, etc… except dates (well, you can use dates, but then they are sorted in relation with there real dates).
If you play with the query/table above you will understand what you control as output to null values with the function default().
https://blacksmithgu.github.io/obsidian-dataview/query/functions/#defaultfield-value