It's true - dogs really can spot people who are untrustworthy, according to a recent study. 

A team of German researchers asked 20 chimps and 32 dogs to first retrieve a container with food that the researcher was pointing to. The test was performed a second time where the researcher pointed to an empty container, according to the abstract of the study

When the first experiment was repeated again in the third phase of the test dogs were much less likely than chimps to trust the researcher. 

"These results suggest that not only dogs are highly skilled at understanding human pointing gestures, but also they make inferences about the reliability of a human who presents cues and consequently modify their behavior flexibly depending on the inference," the researchers wrote in the study abstract. 

The study also shows that dogs like for things to be predictable, John Bradshaw of the University of Bristol in the UK, who was not involved with the research, told BBC.

"Dogs are very sensitive to human behaviour but they have fewer preconceptions," Bradshaw told BBC. "They live in the present, they don't reflect back on the past in an abstract way, or plan for the future. And when they encounter a situation, he adds, they will react to what's there "rather than thinking deeply about what that entails."

The study was published in the online journal PLoS ONE.