Changes to casting in the Handlers

revised casting of generic objects to strings.