better object and array coercion and defaults