Do not add empty arrays

Change-Id: Ic8ffb0d9759338617a92ad171a87652aaca6ccb6