fix get extent when image of nans is passed