I finally found the solution in this thread:
So, I’m just posting a working setup for future reference for anybody wanting to pass geometries between custom classes by what was proposed by @AndersDeleuran and use rhinocommon directly instead and also solve the problem of null object errors: