I wouldn't use it as a general rule.
Basically: castling achieves two things: gets your king to safety, and brings your rook into play.
Now, if you trade a lot of pieces early, king safety might be less important, because your opponent won't have such a powerful attack. However, castling might still be a good way to bring in your rook. Or it might not: sometimes you need your king as an atacking piece.
So when you're unsure about castling, consider whether your king needs to get to safety, and what's the best way to bring your rook into play.
i heard a rather accomplished chess player say that it's not so important to castle if the queens have been taken off the board early. Is this correct thinking?