The reaction carried out in aqueous condition, after completion of the reaction diluting the reaction mass with water, and also tried with basic work up, but crucial is that there is a base sensitive nitrile function in the compound.
You could also use a buffered work up that won't hydrolyse your nitrile. The pH only has to be at a point where your resulting aniline isn't significantly protonated. Anilines are not particularly basic so even a neutral pH would be sufficient, depending on your electronics.
A 1M solution of sodium borate is a good buffer around pH 9.