Correctly check whether the function we are generating code for is a method
Map range
String range