This should be changed to `if not y_label is None:`.