code: private void validateType() {
        if (getType().isCarrierMovementRequired() && getCarrierMovement() == null) {
          throw new IllegalArgumentException("Carrier movement is required for event type " + getType());
        }
        if (!getType().isCarrierMovementRequired() && getCarrierMovement() != null) {
          throw new IllegalArgumentException("Carrier movement is not allowed with event type " + getType());
        }
      }
docs: Validate that the event type is compatible with the carrier movement value.
  <p/>
  Only certain types of events may be associated with a carrier movement.