You may be thinking of the doctrine of judicial review, which allows courts to evaluate laws to determine whether they are constitutional. The law must be part of a case the court is hearing.
Judicial Review
The courts interpret a law when the meaning, application, or constitutionality of a law is part of a case before the court. Appellate courts are more likely to be called upon to interpret laws than trial courts.
That power is reserved for the Judicial System, the courts. Ultimately the Supreme Court of the United States has jurisdiction for US law disputes.
The Judiciary is not directly involved in the process of making or passing a law. After a law is passed, if someone believes the law to be unconstitutional, they can challenge its constitutionality in the courts.
The judicial branch of government is the federal courts, mainly the Supreme Court. The courts interpret the laws that the legislative branch passes.
Federal courts enjoy the sole power to interpret the law, determine the constitutionality of the law, and apply it to individual cases.
The Judicial Branch. If a person or group feels that a law passed by Congress is unconstitutional, they can challenge the constitutionality of the law in the courts. This process is called judicial review.
Judicial restraint is important because without it courts will be tempted to rewrite laws through interpretation rather than simply to confirm or reject the constitutionality of a law. When a court rejects the constitutionality of a law, it should not attempt to fix the problem, rather it should remand the matter back to Congress for revision. Unfortunately for justice, courts often fail to enact constitutionally mandated restraint.
Samuel A. Foot has written: 'An argument in favor of the constitutionality of the general banking law of this state' -- subject(s): Accessible book, Banking law 'An argument, in favor of the constitutionality of the general banking law of this state, delivered before the Supreme Court, at the July term, 1839' -- subject(s): Banking law
Due Process
Yes, US District Courts can, and do, declare laws unconstitutional. Any court can declare a law unconstitutional if the law is relevant to a case they're trying or reviewing; however, the government would probably appeal the case all the way to the Supreme Court to get a definitive answer. The US Supreme Court is the ultimate arbiter of constitutionality, and has final authority over questions of constitutionality.
Due Process