p.s.  Maybe with a try/except, like:
```
    try:
        unit = x.unit
    except AttributeError:
        raise TypeError("Input coordinates should be Quantities with units "
                        "if no explicit unit is given")
```