fix String property null and undefined values are incorrectly cast to a string
fix broken toArray behaviour