Added is_empty as sequence check function