Optimize null path for logging.