Consider doing this check in other methods, too, like `getDistance`.