media: check correctly when file is an object
Merge pull request #60 from Automattic/fix/media-files-bug

media: check correctly when file is an object