This will break on non-generic collection type; `TryToGuessGenericArgument()` will return null.

You can fix that by adding `?? codeTypeRef`.