check for null in `toarray`
0.4.1