def check_table_exists(connection, table_name):
    """
    Returns a Boolean to tell if a certain table exists already.
    """
    data = None
    with connection.cursor() as cursor:
        cursor.execute(
            f'SELECT * '
            f'FROM information_schema.tables '
            f"WHERE table_schema = 'public' AND table_name = '{table_name}'"
            'LIMIT 1;')
        data = cursor.fetchone()
    return data is not None