```return (getTarget()!=null)?getTarget().getLocation().distance(loc):-1;```

Also add in java docs when you get to them on another commit. That it will return -1 if the object was null.