Add explicit special casing for file objects (py2 only), so they still come out as None