Please learn about guard clauses!
One of the reasons is that that pyramid of nested IFs growing to the right side of the screen is harder to read and understand the logic when troubleshooting.
Guard clauses are much more elegant and natural: "validate the data before using it". Take care of exceptions first and return, otherwise proceed to the main logic if validation passed.
#programming #codereview #cleancode