Check if cursor is null.