check for element in a table