[front] Simplify two if statement conditions in Utility.java the same way I did in the previous commit.

Also changed the cosmetic look of the simplified version of the condition that was simplified in the previous commit.