Convert conditional to guard clause