Remove String.asType metaprogramming from Rest code