added special logic for inferring type from familiar methods like charAt