Tell if interrupts are enabled
One way of doing this is to save, and then later restore the SREG status register, thus saving and later restoring the interrupt status to whatever it was, thus:

  uint8_t oldSREG = SREG; // Save the status
  cli();

  // Do stuff, as little as possible.

  SREG = oldSREG;


Also, the rationale described in the question has inherent problems: If some other code already had interrupts disabled, and your code enables interrupts, data corruption or program failure could occur. Any "interrupt-disabled" block of code would be expecting all registers and memory / variables to remain untainted, while enabling interrupts can cause that to change.

Therefore the reverse logic, as in the code fragment above, is best practice: Explicitly disable interrupts for your own code as needed, but restore interrupts as soon as possible, then proceed with the rest of your processing.