This is a myth. Any branch can declare a law unconstitutional. If Congress thinks a law is unconstitutional they can keep it off the books. If the President thinks a law is unconstitutional he can refuse to enforce or execute it.
The courts get a reputation as the ones who decide because A) if the other branches do their duty it never gets to the courts, which means the courts have the last word and are the final check on unconstitutional activity, and B) the other branches of government are happy to let you believe they have no responsibility to uphold the constitution (even though they very much do) because they're elected and elected officials violating the Supreme Law of the Land is fairly unpopular, so all the better if people mislead themselves into thinking that they have no responsibility.