How about simply
``` python
# Get major tick label size (assumes that's all we really care about!)
sizes = [tick.get_fontsize() for tick in axis.get_ticklabels()]
if sizes and sizes[1:] == sizes[:-1]:
    props['fontsize'] = sizes[0]
else:
    props['fontsize'] = None
```
Is there any reason you wanted to ignore all fontsizes if any of them happen to be different?