Found a bug where the list is being returned as null from the R code. Case now handled correctly