protected function whenPivotLoaded($table, $value, $default = null)
    {
        if (func_num_args() === 2)
            $default = new MissingValue;

        return $this->when(
            $this->pivot && ($this->pivot instanceof $table || $this->pivot->getTable() === $table),
            ...[$value, $default]
        );
    }