Add error handling for gufunc object mode