Adding safe check on parms in shipments_controller and sorting by code not name