You should have several fool-proof reality checks. Whether its looking at your hands, trying to put them through each other, jumping, checking a digital clock or looking for a change in complex patterns/imagery or chunk of text, mixing them should give you a generally good idea where you are. Also trying to remember how you got to a certain place, wherever you are standing/sitting, back track your thoughts. In a dream, you generally -- I like the term I read earlier on the forum, clearly from a gamer -- spawn almost randomly in places, you just appear at the start of the dream.

If someone mixed reality for a dream, that would be very dangerous. Although I don't know how that applies to the sleep walker and lucid dreaming.