Additional null protections in WordPressDB.saveMediaFile().