Klothys's last ability targets a card in a graveyard, and you must target such a card, if possible, when the ability goes on the stack; it's not optional (C.R. 603.3, 603.3d, 601.2c). If that card is an illegal target as the ability would resolve (e.g., because it left its owner's graveyard before the ability resolves), that ability will fail to resolve and will do nothing (C.R. 608.2b).
However, if that ability resolves with a legal target and you exile a commander this way, the ability still checks whether the card was a land card or not (while it was in that graveyard), even if that commander moves to the command zone instead of to exile (under C.R. 903.9).
EDIT: Clarification after comment 4 was posted.
EDIT (Jul. 2, 2020): Edited to conform to rule update with Core Set 2021.
EDIT (Dec. 7, 2020): Clarification.
But if all graveyards are empty, she can’t do anything...right?
Klothys's last ability will still trigger and go on the stack even if no graveyard has any cards (C.R. 603.2, 603.3); it's just that the ability is removed from the stack without resolving (in other words, it will do nothing) if there isn't a card in a graveyard to target with that ability (C.R. 603.3d, 601.2c, 117.4). See also this thread.
However, if that ability resolves with a legal target and you exile a commander this way, the ability still checks whether the card was a land card or not (while it was in that graveyard), even if that commander moves to the command zone instead of to exile (under C.R. 903.9).EDIT: Clarification after comment 4 was posted.
EDIT (Jul. 2, 2020): Edited to conform to rule update with Core Set 2021.
EDIT (Dec. 7, 2020): Clarification.