can top_taxa be an empty list in this part of the code? if so can you add a check for that?