add return null if key is array and value is scalar
add tests, add composer