Can we merge these two nested if statements into one? This is how it used to be before extraction.