Update dbus code generator to allow for empty lists for type 'as'

Upstart when in user-session mode, needs to pass lists over dbus connection which may be empty.

This drops the != NULL check for NULL terminated arrays and moves the
iteration loop inside an 'if' statement.