It says "Gain a card" (and there is no "if you do," clause)... but the described card to gain refers to "the trashed cards"; if you didn't exercise the option, then you haven't actually trashed an empty set of cards, and thus the card gaining fails.
I think.