Checks if the current item is valid.