adds a more robust method of checking for arrays