When Warren Pilferers enters the battlefield, return target creature card from your graveyard to your hand. If that card is a Goblin card, Warren Pilferers gains haste until end of turn.
If the card is an illegla target as the ability resolves, the ability won’t resolve and none of its effects will happen. Warren Pilferers won’t gain haste.
The ability checks whether the targeted card is a Goblin when the ability resolves.