When many of us first learned programming, the natural tendency when writing functions was often sequential validation: check condition A, if true check condition B, if true check condition C, and then finally perform the core logic or return the result.
This approach might look something like this conceptually:
function processData(data, user, config) { if (data !== null && data !== undefined) { if (user.isAuthorized) { if (config.isEnabled) { // --- Core Logic --- console.