def _check_usable(inst):
    """Ensure our data are clean."""
    if inst.proj:
        raise RuntimeError(
            'Projectors cannot be applied to data during Maxwell filtering.')
    current_comp = inst.compensation_grade
    if current_comp not in (0, None):
        raise RuntimeError(
            'Maxwell filter cannot be done on compensated channels, but data have been compensated with grade %s.'
             % current_comp)
