Heat treatment of nickel based superalloys