Creates an instance of a type based on a string. Assumes that the type's