Can these two if statements be collapsed with the above ones?