Change implementation of cursor_utils.is_cursor.
Add test.
Update doc.