Avoid AttributeError: 'NoneType' object has no attribute 'getAvailableSizes' when we have a file attached to the News Article