In the novel The Overlook uses racism to scare Dick Hallorann. In the movie Stanley Kubrick hides the racism very well. If Grady is a figment of Jack's imagination, then it's Jack and not the "ghosts" inside the Overlook where the racism now lies. Someone else on another website noticed this and it doesn't belong in this movie;
I would never know what this toy was as I'd never heard of or seen a Gollywog before. But you have to believe that Stanley Kubrick added this little touch in Danny's toys to indicate that one of his parents might be a racist, as they were the ones that probably gave it to him. It might have something to do with Dick Hallorann's death but I don't believe it because Stanley Kubrick is a perfectionist and the Gollywog isn't even close to the spot where he is killed. The rabit on the tryke is but not the Gollywog. You'll have to be the judge but it is an interesting little visual tidbit that's been added to the film. Hidden very subtly just like everything else I've discussed.