The player can’t choose to discard two cards unless they have at least two cards in hand. Similarly, that player can’t choose to sacrifice a creature or planeswalker unless they control one. This means that if the target opponent doesn’t have two cards in hand and doesn’t control a creature or planeswalker, that player will lose 5 life and then lose 5 life again.