code: public static void invalidStateIf(boolean tester, String msg, Object... args) {
          if (tester) {
              invalidState(msg, args);
          }
      }
docs: Throws out an {@link InvalidStateException} when `tester` evaluated to `true`.
  
  @param tester
  when `true` then an {@link InvalidStateException} will be thrown out.
  @param msg
  the message format template
  @param args
  the message format arguments