[elasticsearch] check for valid mappings

Otherwise throws a warning if table has no mappings