The first hand looks a bit fishy.
He raises but then doesnt attack the pot post flop. If he has a pair or even an overpair or set i would think he has to bet at that pot. Even a continuation bet. It would be dangerous to check it, unless of course he wants or needs to see another card. Its active with a potential draw.
If he checks that im betting into him hard. If he comes back hard then thats a problem. i just cant see him checking that flop, it seems weak or that he needs to see another card.
Obviously the turn makes you toast with 4 outs to a better hand, not that i wouldnt call either with two pair or think i was probably ahead.

set vs straight hand.
Yeah, thats tough to detect. one of those hands i think when the river arrives you are going to pay off the straight. I think you just have to say that you ran into a better hand and hope it doesnt happen too often. Ill pay that off most times i think.