default to 0 when sorting by fields that have nulls