Update: the problem is solved.
I just created a list of problematic(NoneType) images and removed those images.
problematic_images = []
for img in new_df.iloc[:, 0]:
    img_path = os.path.join(root_dir, img)
    img_array = cv2.imread(img_path)
    if type(img_array) == type(None):
        problematic_images.append(img_path)