Check if parent.required is set and an array before pushing data to it