Check $data if it's an array or object.

There were also one warning when testing with Stargazer default header before saving it again one time. This is weird stuff.