Well heck! if it's going to do a "fly by" before the actual impact, just blow it up as it whizzes past the planet earth. How hard can that be? We've got more than 20 years to plan for Pete's sake.
Whew! I thought there was actually something to worry about...
No we don't. Other asteroids have been discovered, only when they had actually passed us. Like the near miss that occurred recently.
""Earth had a close call in 2002. In one of the nearest passes ever recorded, a rock the size of a football field that passed extraordinarily close to our planet on June 14 went undetected until June 17. The asteroid speeding along at 6.2 miles per second missed us by only 75,000 miles. That's only one-third the distance to the Moon.""