I don’t think you can categized an entire class - rap is varied. That being said, I think it is fair to define what qualifies as music and what does not. Very subjective and a bit meaningless, but why not. Once those definitions are in place, sounds can be either music or not music. I have a teen son so I am exposed to lots of new "sounds" and some if it is not, IMO, music. For me, some rap is not music and some of the electronics (not sure what to even call it) is not music - may be call it random industrial sounds. Some rap and techno is great stuff though and is on my play list. Some rap does not make the play list even though I like the beat or sound of it because in some songs the lyrics are disgusting and/or violent. Ruins another wise interesting track.
I wanted to add that music does not exist in a vacuum. It is a product of the artist and is influenced by their environment. The link between the music and the artist and their environment is fascinating. Compare classical to old time country music in the US to rap. They both used what was available and what was popular is based on what appealed to the masses or the decision makers. Segments of society choose/select the popular/famous music - so it is also a representation of that segment of society. When we look at popular music it is a reflection of what appeals to that segment of society, what type of music could be make (instruments /training available) and music training/tutoring available.