def _check_table(conn, plant_name):
    """
    Utility to check if table exists in the DB connection.

    Args:
        conn (obj): database connection (sqlite)
        plant_name (str): name of plant for writing to correct table

    """
    command = """
            SELECT 1 FROM sqlite_master WHERE type='table' and name = ?"""
    check = conn.execute(command, (plant_name,)).fetchone()
    return check is not None