Whenever the laws of such State authorize or permit the exercise of any or all of the foregoing powers by State banks, trust companies, or other corporations which compete with national banks, the granting to and the exercise of such powers by national banks shall not be deemed to be in contravention of State or local law within the meaning of this section.