Catch undefined, null, and empty file objects