That is a really interesting question. Would that NFT be illegal to own or posess? It isnt the actual material. It could be a hash and ownership information, but the illegal material need not be in the NFT. Hashes for such material are not illegal. In fact there are databases full of such hashes in use by file hosting services to detect and remove such things. Owning an associated NFT would be like owning an NFT for "cocaine" but never being anywhere near real cocaine. It may be worthless, but i dont see how it would be actually illegal.