Draw a card. Master the Way deals damage to any target equal to the number of cards in your hand.
If the permanent or player is an illegal target as Master the Way tries to resolve, Master the Way won’t resolve and none of its effects will happen. You won’t draw a card.
Use the number of cards in your hand after you draw the card to determine how much damage Master the Way deals to the target permanent or player. (Remember that Master the Way is not in your hand; it’s on the stack.)