Add check before pushing to make sure that array exists.