private Notification validation(CustomerDto customerDto) { Notification notification = new Notification(); if (customerDto == null || customerDto.getRequestBodyType() == RequestBodyType.Invalid) { notification.addError("Invalid JSON data in request body."); } return(notification); }