Checking if image is valid when getting instance