Add conditional statement 'if max_prob_labels:' in case assign_max_prob_label() returns None