Strongy makes a good point. We can try to prepare now for a possible asteroid or comet colliding with the Earth so that when we discover one with an undesireable course, we have the know how to deal with it. We also have the option to wait until we discover one coming for us and use the (probably) few months that we will then have to try to learn what to do. I would choose the former.
Nasa has already sent probes to analyze comet dust to try to learn about what comets are made of, exactly. Nasa has also
successfully landed a probe on an asteroid. That would be the first step in pushing that asteroid into another trajectory.
From what I've seen, Nasa wastes a huge amount of money. However, not all of the money they spend is wasted. They are also accomplishing quite a lot.
The next potential Earth impact probably won't happen in our lifetime. But, then again, it could happen in a year. We just don't know. We're not devoting nearly enough resources to looking for objects with Earth crossing orbits. If you're not looking for it, you either find it by accident or you don't find it. Neither option is palatable.