Cannot handle a case with a return value of method on a string