The ValueType test now takes into account return types and @TypeInfo annotations (#1700)