If the creature was only a creature as the result of an animation effect, its controller still gets to search for a card with the same name. For example, if an animated Still Life is put into a graveyard, its controller gets to search their library for a card named Still Life.