Flatten supports null; Loop instead of push.apply