I would do it like this:

``if not getattr(xvalues,'is_all_dates',None)``

because if for some reason xvalues is an ``ndarray`` this would fail