check if item is valid