Handling optional parameters in a servlet
I suggest extract code for getting parameter to separate method (see extract method refactoring's tehnique):

param = getOptionalParameter("httpParam");
if (! param.isEmpty()) {
    // Handle parameter
}