why result of sorting empty array should  be null?