It's not about timing the market. Nobody can ever time the market perfectly and if they do, they are just lucky. However, there is nothing wrong with taking a more defensive or offensive outlook even if you have 20+ years to retirement. For example, many people believe and rightly so in my opinion that stock markets and bond yields are currently distorted by the huge amount of monetary easing by the various central banks so comparisons to historical valuations need to be treated with caution. Current valuations are not based on fundamentals. They are based on low interest rates and excess capital all chasing yield. That doesn't mean that stock markets won't continue to increase for the forseeable future but it does increase the risk of a major correction.
I am still investing in equities as I want the exposure but I have locked in most of the gains I have got over the past 5 years or so by moving a sizable percentage into a more defensive fund. Have I lost some upside gain? Yes, a small bit. But I am happy for the moment to have a good chunk of capital sitting on the sidelines (relatively speaking as still invested) . However, to be clear, I am not trying to time the market. I have lost some upside since I moved and I will lose some upside when I decide to buy back in because there is no chance of me being able to buy in at the exact bottom in but I am willing to do that.