Added extension of function return values if they are objects