class HttpUtils {

    public static Optional<String> requestParameterPresent(String parameterName, HttpServletRequest request) {
        Map<String, String> params = simpleMapValue(request.getParameterMap(), array -> array != null && array.length > 0 ? array[0] : null);
        // See if we have any default matching.
        String defaultMatch = params.get(parameterName);
        if (defaultMatch != null) {
            return ofNullable(defaultMatch);
        }
        // Any that are matching for our MMYYYY dates.
        String matchForMMYYYY = processForMMYYYY(params).get(parameterName);
        if (matchForMMYYYY != null) {
            return ofNullable(matchForMMYYYY);
        }
        return Optional.empty();
    }

    private  HttpUtils();

}