A cheapie rubber hood will be fine on a 50mm lens, although a solid hood will provide better protection. I almost always prefer the manufacturers official hood.
On wider focal lengths generic hoods may vignette, and on longer focal lengths they may not provide the best shading of the front element.
Phil