Add check for null axis units

Refs #8409
Merge branch 'bugfix/8490_mantid_curve_over_qtiplot' into develop