#6 check before merge

Check if item has values before array_merge

Resolves #6 and #3