if given the opportunity to shoot both, then do so. pick the one that suits you the best. both are good options and would serve you well, but it really comes down to personal preference more than anything.
i can shoot a Glock quite well, but my hand prefers the M&P over the Glock due to ergonomics. having owned and shot many, many pistols over the years i have become accustomed to adapting to many different pistol designs and have learned to shoot them well. this is not always the case of the newer shooters though.