add primitiveObject option
add nullAsObject option