Pipes Banging

My Whirlpool dishwasher has recently started banging the pipes when the dishwasher started filling or emptying. Is this a valve or pump wearing out? Any suggestions??