Handle undefined argument type

Fix getTypeString in rest-adapter to handle the situation where
the type is not specified or not a function/string.