Only set order by if it's set, otherwise we ORDER BY NULL