[BUGFIX] NULL values are not considered during toArray conversion