Inverting if statements and early returns are two techniques that can be applied that can improve your codebase.
When used properly it can reduce indentation and complexity.
links in video:
https://refactoring.com/catalog/repla...
https://www.jetbrains.com/help/reshar...