Check for setSelectionRange before using method