Sorry to disagree with you pennpiper, but definitely yes, although an additional 'it depends'.
1. Some type of control valves, especially for severe conditons, or working at cavitation conditions (P2/P1 < 0,59 for liquid fluids, for instance needle valves, will require straight runs both upstream and downstream to ensure even inflow and an outflow where the cavitation area lies in center of the pipeline and outside the valve (not beeing backlased with for instance a 90 degree bend)
2. In general: As all control valves are dimensioned for flow (not pipeline size) and pressure upstream and downstream it is important that the flowlines inside the valve behaves and flow as planned for the design.
This will again require that the upstream inflow is distributed evenly around the flow regulating device, and passes evenly through or over the regulating device, and out of the valve without backlash or disturbance influencing the throughflow.
3. For some fluid and regulating conditions and some control valve constructions straight stretches upstream and/or downstream are of little or no importance, for others essential.
I would never be so categorical as to say an absolute no to straight stretches without knowing the exact conditions and details for fluid, valve, control parameters and pipeline layout.
... and you would probably not clinch an important regulating valve without some leeway between possibly disturbing bends and revision valves or other components anyway, if you could avoid it?