xAxis nullcheck

reffer to #3044, fix for the nullcheck