Getting return type of function is more accurate