code: private MessageType checkMessageInitialized(MessageType message)
        throws InvalidProtocolBufferException {
      if (message != null && !message.isInitialized()) {
        throw newUninitializedMessageException(message)
            .asInvalidProtocolBufferException()
            .setUnfinishedMessage(message);
      }
      return message;
    }
docs: Helper method to check if message is initialized.
  
  @throws InvalidProtocolBufferException if it is not initialized.
  @return The message to check.