Fix crash if invalid row given.

Now the function checks if the row exists in the contact id list, and returns null if it doesn't instead of crashing.
This is not the correct behavior: imagine your m_allContactIds contains [0, 2], contains(2) returns true, while at(2) segfaults (trying to reach the 3rd item of the list). You should compare row to the size.

I would replace this by if (row >= 0 && row < m_allContactIds->size())