In all the protest and debate over the Guardian's disclosures of widespread personal communications surveillance and the nine-hour detention of David Miranda at Heathrow airport, an odd theme has kept recurring, something that must seem to many like a side issue. Is Miranda a journalist?

Miranda lives in Brazil with his partner Glenn Greenwald, who has been disclosing the material leaked by Edward Snowden about the scope of interception by the American and British authorities. Miranda was moving (presumably leaked) material between Greenwald and a film-maker in Berlin. So hardly a journalist by most definitions; more of a bagman on his own account. Miranda claimed to have no idea what was on the memory sticks he was couriering. But his air fare was paid by the Guardian, and his journey was presumably important to possible future disclosures.

Why does it matter if Miranda counts as a journalist or not? Because of well-intentioned but muddled law. Controversial journalism happens at the junction of two colliding rights: the right of a state to keep things secret to keep its citizens safe; and the right of the news media to disclose matters that inform public discussion. One way of managing this is to give journalists a special legal status.

Special treatment is reserved for "journalists" because they dislodge facts that society needs to know. Some American states have "shield laws" which exempt reporters from obligations to identify sources. So at least in jurisdictions influenced by American law and the first amendment (which bars government interference with "the press"), being classified as a journalist may make people safer. Julian Assange, the founder of WikiLeaks, was openly contemptuous of mainstream journalists until he faced the risk of criminal trial in the US. At that point, he began describing himself as a journalist and toned down his scorn.

I've always been uncomfortable with formal protections for individuals that turn on a claimed status (or one assigned by law or a court). Journalism is a messy, porous business, ill-suited to being roped off as a professional caste. Important roles in great disclosures have been played by whistleblowers, brave sources, bag carriers and people in the right place at the right time. If that's true for the past, it's surely true in spades now.

Do people defined as journalists need special status in the digital age? Drawing a line around what is journalism and who is a journalist is harder than ever, but the British police seem to have noticed something not all journalists have grasped. Whistleblowing leaks of data will be a feature of the era in which governments and others collect and store that data. To get it to the public domain secrecy, expertise and guile may be required. People who don't work as reporters or editors may be involved – as Miranda appears to have been.

Laws to protect disclosure should turn not on the status of an individual but on the value of the disclosure. That is the idea that underlies the "public interest" principle. Is there – the law should ask – a public value in the disclosure that can override other considerations? The status of the person in trouble with the law is the wrong test.

Government attempts to encourage or enact new rules in the wake of the Leveson inquiry have run into the same quicksands of definition, because they require the law to decide who or what is something called a "relevant publisher".

British lawyers tend to dislike "public interest" because it is too slippery and vague to be useful in court. But it's a much better idea than trying to work out, in today's digitally blurred world, who's a journalist and who's not.