Yes, llamas spit, but very rarely at people.
Within their own herd they use this as a warning to other llamas in food & breeding disputes. It is also a way of keeping the herd pecking order in place or to establish the herd hierarchy.
It is much safer than biting & kicking.
However, some llamas are brought up to believe that humans are part of their herd, notably zoo reared llamas. They come into contact with lots of different people every day and each day they see this new person as a new arrival to their herd. They may well spit at that person to let them know that the llama is higher in the pecking order than they are!
Llamas that have been brought up on a farm or smallholdings only meet new people on special occasions, and they do not see the new person as part of the herd, and therefore they do not spit at them.