add null check to str_split