Avoid exception when output is nil.