fix: handle empty data set in median computation