Yes, this is where THINKING comes in.
First step, stop caring about anything specific about the person that gave you the advice, and only consider the advice.
Second step, try to think if it's good advice, in itself. If it is, follow it.
The guy being a hypocrite or not should not come into play at all. Neither should trust.
You should not follow some advice because you trust the guy who suggested it to you. You should follow it because you evaluated it.
In particular, if a person's behavior or circumstances conflict with the advice, it becomes important to evaluate why that conflict exists. Is the advice fundamentally sound and there's something wrong with the advice-giver, or is the problem with the advice itself? There may be some subtle implementation detail that you overlook in your theoretical "ignore the person" evaluation, which is actually a fatal flaw with the advice (for example, it may require an unrealistic amount of discipline to undertake.)
Likewise, if a person's advice and their behavior/circumstances match up, it's important to evaluate whether the advice is actually effective. Did this person see this result because of the advice, or because of something else? It's possible the advice is fundamentally sound; likewise, it's possible the advice is a mistaken conclusion based on coincidence. If the person giving the advice is known to be insightful, self-examining, etc. that suggests a greater likelihood of the advice being valuable.
If the person is a domain expert (or probably just 'more likely than you to know about it') and you are not and you have other reasons, past experience perhaps, then trusting their advice with little analysis (beyond eg 'was it a joke') is pragmatic. One can't analyse everything there is simply not enough time.
At some point you must trust others or suffer. It's about balance n'est ce pas?