GString needs converting to string on input here to ensure we don't get a class cast exception.