Potential fix for null pointer error when failing to read image from URL