private void handlePrechecks(RestRequest restRequest, RestResponseChannel restResponseChannel) {
    if (restRequest == null || restResponseChannel == null) {
      StringBuilder errorMessage = new StringBuilder("Null arg(s) received -");
      if (restRequest == null) {
        errorMessage.append(" [RestRequest] ");
      }
      if (restResponseChannel == null) {
        errorMessage.append(" [RestResponseChannel] ");
      }
      throw new IllegalArgumentException(errorMessage.toString());
    }
  }
Checks for bad arguments or states.
@param restRequest the {@link RestRequest} to use. Cannot be null.
@param restResponseChannel the {@link RestResponseChannel} to use. Cannot be null.
ambry-frontend/src/main/java/com/github/ambry/frontend/FrontendRestRequestService.java