Base the spell on Kelens Dagger of Escape and just order a unit to stop when he casts the spell.
Nevermind, I think that ability allows you to click on unpathable areas.
You can base the spell on Blink and order the unit to stop when casts it.
Then, utilize the data like Target point of ability being cast, etc..