Just add this condition to #process_params, the code here will be cleaner