The hint is in the error: return type is "Array[Object]'".
Your function returns an array of objects, not an object. You need to either wrap the result of your get() in an array, or change the return type to MyClass.
With what you have, it ought to return an empty array on failure, not a nil.
Yeah, I ended up returning an empty array, my confusion comes from the fact that in other languages an array of objects is also an object. I’m surprised this is not the case in GDScript. Anyway, thanks.
Fyi arrays are not class objects. Neither are dictionaries. You cannot inherit from them nor extend them. I know in pure oop they would be, e.g. Smalltalk where everything is an object.