How do I resolve a NullReferenceException during the build process in Unity?

While working on a Unity project, I encountered a NullReferenceException error during the build process. This occurs when I attempt to build and run the project, resulting in a build failure. The detailed error log is as follows:

NullReferenceException: Object reference not set to an instance of an object BuildPreprocessor.OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport report) (at Assets/UMA/Core/Editor/Scripts/BuildPreprocessor.cs:14) UnityEditor.Build.BuildPipelineInterfaces+<>c__DisplayClass16_0.<OnBuildPreProcess>b__1 (UnityEditor.Build.IPreprocessBuildWithReport bpp) (at <9959c9185b684a4d9d56448296fb9048>:0) ... Error building Player: NullReferenceException: Object reference not set to an instance of an object Build completed with a result of 'Failed' in 1 seconds (1282 ms) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun () UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <9959c9185b684a4d9d56448296fb9048>:0 at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <9959c9185b684a4d9d56448296fb9048>:0 UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()

The error seems to be originating from a script in the UMA (Unity Multipurpose Avatar) Core folder, specifically BuildPreprocessor.cs at line 14.

Any guidance on how to troubleshoot and resolve this error would be greatly appreciated. Thank you!