Merge "Check for null before clearing selection set."