Generation of TeraHertz radiation assisted by optical phonons in nitride‐based quantum wells and heterolayers