public static function isFunctionOfType($model, $key, $tipo = "Illuminate\Database\Eloquent\Collection") {
        if (method_exists($model, $key)) {
            return is_a($model->$key(), $tipo);
        } else {
            return false;
        }
    }