You may put the triggered ability with no targets. However, If you choose a target creature in your graveyard, and that card is an illegal target when the ability tries to resolve, it won’t resolve and none of its effects will happen. You won’t gain 3 life.