Added a check to parse - encase array is empty