Why do companies need legal opinions before registering patents or trademarks