Prevent failure with null in List toObject

Similar to #223 - just in case