Handle returned function and object