Your dog is staring at an empty corner of the room, barking their head off. You look. Nothing is there. You look again, more carefully. Still nothing. Your dog does not care what you think you see. They know what they're reacting to.
The thing is — they're right. "Nothing" to you just means outside your range of perception. Dogs hear and smell things in ranges we genuinely cannot access.
What your dog is actually detecting
High-frequency sounds. Dogs hear up to about 65,000 Hz. Humans top out around 20,000 Hz. Your dog is routinely picking up sounds — electrical hum, ultrasonic pest repellers, appliances cycling, pipes — that are simply inaudible to you. A dog barking at an outlet or wall is often reacting to a real sound inside the wall that you'd need specialized equipment to hear.
Animals in the walls, attic, or yard. Mice, squirrels, raccoons, and insects produce sounds and scents well within a dog's detection range. If your dog is focused on a specific wall or corner and won't be redirected, pests are worth investigating. Dogs are usually right about this one, and they'll keep alerting until the thing is gone.
Outdoor animals you can't see. At night especially, dogs detect cats, foxes, possums, or deer passing by outside — the scent alone through a closed window can be enough. If your dog is barking at the window at 2am, there's almost certainly an animal nearby that's since moved on by the time you get up to look.
People and distant sounds. Dogs can hear a car turning into the driveway, a person's footsteps on the street, or a conversation at a distance that registers as a threat-worthy sound. They're not being irrational. Their threat assessment is just calibrated to different inputs than yours.
When the barking itself is the problem
If the "nothing" barking is occasional and your dog settles quickly, it's just alerting — leave it alone. If it's happening constantly, at random, and your dog seems confused or unable to stop, that's a different situation.
In older dogs, persistent inexplicable barking — especially at night — can be a sign of canine cognitive dysfunction, which is the dog equivalent of dementia. A dog that seems genuinely confused, disoriented, or anxious alongside the barking, and is over 10 years old, is worth a vet conversation. This is also something to watch for if you're seeing other changes like forgetting routines or unusual clinginess.
For most dogs, most of the time: they heard something real. You just missed it.