That has been ruled on - on contracts the Federal Court stated that it is contract law and if it is marijuana it doesn't matter - see the 2 GRNF lawsuits.
But as far as the US Bankruptcy Court goes they have rejected all marijuana bankruptcy cases - as well as all marijuana patent infringement cases.