|Keep It Simple, Stupid|
Having gone through the same experience of posting an answer to later find it was incorrect, I've developed what I think is a reasonable approach.
If you're not 100% sure then (when possible) test it yourself before you post.
1 of 2 things may happen:
1 - You come back to give the answer and find that someone else has already answered it.
No matter - you've learnt something new today and are better prepared to give advice in future.
2 - You come back to give your answer - the query's still unanswered - you can give a good answer and be assured it will be correct and useful.
/me let's put this in practise!