type checking for 'lists'