diff --git a/ProcessLib/BoundaryConditionAndSourceTerm/CreateSourceTerm.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/CreateSourceTerm.cpp
index 7850fa9e4cb1ac1426967babe72eabfd5d65bd28..2ae9b5628f32baaddf7f1d74ec343b5ab7421871 100644
--- a/ProcessLib/BoundaryConditionAndSourceTerm/CreateSourceTerm.cpp
+++ b/ProcessLib/BoundaryConditionAndSourceTerm/CreateSourceTerm.cpp
@@ -33,13 +33,13 @@ std::unique_ptr<SourceTerm> createSourceTerm(
     // check basic data consistency
     if (variable_id >=
             static_cast<int>(dof_table_bulk.getNumberOfVariables()) ||
-        *config.component_id >=
+        config.component_id >=
             dof_table_bulk.getNumberOfVariableComponents(variable_id))
     {
         OGS_FATAL(
             "Variable id or component id too high. Actual values: ({:d}, "
             "{:d}), maximum values: ({:d}, {:d}).",
-            variable_id, *config.component_id,
+            variable_id, config.component_id,
             dof_table_bulk.getNumberOfVariables(),
             dof_table_bulk.getNumberOfVariableComponents(variable_id));
     }
@@ -59,7 +59,7 @@ std::unique_ptr<SourceTerm> createSourceTerm(
         "Found {:d} nodes for source term at mesh '{:s}' for the variable {:d} "
         "and component {:d}",
         source_term_nodes.size(), source_term_mesh.getName(), variable_id,
-        *config.component_id);
+        config.component_id);
 
     MeshLib::MeshSubset source_term_mesh_subset(source_term_mesh,
                                                 source_term_nodes);
@@ -68,11 +68,11 @@ std::unique_ptr<SourceTerm> createSourceTerm(
     {
         auto dof_table_source_term =
             dof_table_bulk.deriveBoundaryConstrainedMap(
-                variable_id, {*config.component_id},
+                variable_id, {config.component_id},
                 std::move(source_term_mesh_subset));
         return ProcessLib::createNodalSourceTerm(
             config.config, config.mesh, std::move(dof_table_source_term),
-            source_term_mesh.getID(), variable_id, *config.component_id,
+            source_term_mesh.getID(), variable_id, config.component_id,
             parameters);
     }
 
@@ -80,10 +80,10 @@ std::unique_ptr<SourceTerm> createSourceTerm(
     {
         auto dof_table_source_term =
             dof_table_bulk.deriveBoundaryConstrainedMap(
-                variable_id, {*config.component_id},
+                variable_id, {config.component_id},
                 std::move(source_term_mesh_subset));
         auto const& bulk_mesh_dimension =
-            dof_table_bulk.getMeshSubset(variable_id, *config.component_id)
+            dof_table_bulk.getMeshSubset(variable_id, config.component_id)
                 .getMesh()
                 .getDimension();
         return ProcessLib::createVolumetricSourceTerm(
@@ -100,7 +100,7 @@ std::unique_ptr<SourceTerm> createSourceTerm(
 
         return ProcessLib::createPythonSourceTerm(
             config.config, config.mesh, std::move(dof_table_source_term),
-            variable_id, *config.component_id, integration_order,
+            variable_id, config.component_id, integration_order,
             shapefunction_order, source_term_mesh.getDimension(),
             all_process_variables_for_this_process);
     }
diff --git a/ProcessLib/BoundaryConditionAndSourceTerm/SourceTermConfig.h b/ProcessLib/BoundaryConditionAndSourceTerm/SourceTermConfig.h
index 60f7cb2854997c7de951139c674523e6997af286..170ee89a6025bb3e3133a28c1ae2eb7cdc9ede54 100644
--- a/ProcessLib/BoundaryConditionAndSourceTerm/SourceTermConfig.h
+++ b/ProcessLib/BoundaryConditionAndSourceTerm/SourceTermConfig.h
@@ -19,7 +19,7 @@ struct SourceTermConfig final
 {
     SourceTermConfig(BaseLib::ConfigTree&& config_,
                      MeshLib::Mesh const& mesh_,
-                     std::optional<int> const component_id_)
+                     int component_id_)
         : config(std::move(config_)), mesh(mesh_), component_id(component_id_)
     {
     }
@@ -33,7 +33,7 @@ struct SourceTermConfig final
 
     BaseLib::ConfigTree config;
     MeshLib::Mesh const& mesh;
-    std::optional<int> const component_id;
+    int component_id;
 };
 
 }  // namespace ProcessLib
diff --git a/ProcessLib/ProcessVariable.cpp b/ProcessLib/ProcessVariable.cpp
index b7d0d58c9c5851631a95888ac6182f1a20d94920..2ae57236f49171a8d69ed778b98cbd8007fabda6 100644
--- a/ProcessLib/ProcessVariable.cpp
+++ b/ProcessLib/ProcessVariable.cpp
@@ -172,14 +172,24 @@ ProcessVariable::ProcessVariable(
                 //! \ogs_file_param{prj__process_variables__process_variable__source_terms__source_term__component}
                 st_config.getConfigParameterOptional<int>("component");
 
-            if (!component_id && _n_components == 1)
+            if (!component_id)
             {
-                // default value for single component vars.
-                component_id = 0;
+                if (_n_components == 1)
+                {
+                    // default value for single component vars.
+                    component_id = 0;
+                }
+                else
+                {
+                    OGS_FATAL(
+                        "Specifying the component id (<component>) for a "
+                        "source term for a non-scalar process variable is "
+                        "mandatory.");
+                }
             }
 
             _source_term_configs.emplace_back(std::move(st_config), st_mesh,
-                                              component_id);
+                                              *component_id);
         }
     }
     else