Positivity of direct image and Kodaira dimension