I have the Canon 50mm1.4 and if you shake it, you can feel a sort of clonk as though something is moving inside the lens. From what I've been able to gather, it's pretty common to the lens, and has no effect at all on it's performance. Whilst I'm not absolutely sure, I seem, to remember the 1.8 version does, or can exhibit the same symptom.
A Google search should throw up lots of info on this. I'd say it's nothing to worry about if the lens is performing well, but if in doubt then obviously seek a professional opinion.