That fateful incident — which saw the Enterprise's resident android comprehensively obliterated — occurred in “Star Trek: ...
Before transporters had technology to filter out contaminants Starfleet officers followed a decontamination process.