types.file: Use `six` for better type-checking