// Validate length, width and height
if (length != null && width != null && height != null) {
str += "&length" + suffix + "=" + length + "&width" + suffix + "=" + width + "&height" + suffix + "="+ height;
}
else if (length != null || width != null || height != null) {
throw new IllegalDimensionException("length, width and height must be specified");
}
if(str.equals("")){
throw new IllegalDimensionException("Weight in grams, or volume must be specified.");
}
return str;
}