When should a company obtain a legal opinion for corporate transactions or compliance?