insure that x is defined, when it's empty in legacy data set it to 0