Fix issue with multiple metrics in arrays with dataTemplates

Fixes issue #2 on your repo.

Simply checks, when the target received is an array, for g.target to exist before pushing to it.

I believe there are more elegant ways to do this, feel free to improve it.