 Early in the movie, Ted mentions the Library Policemen. This is a  reference to a story by Stephen King (I) (qv) (who also wrote the  source novel for the movie) that appears in his anthology, "Four  Past Midnight".