If base and override are not the same type the function should return an error instead of potentially raising a panic