Fix #6963

we don;t need to bother with yaml if the type is not string,
because the type is already defined.