check if the paramater has an array first