cactiStyle did not work when no data was used

When cactiStyle function receives an empty series crashed. Now a better null check approach is used.