Checking the length in both cases is unnecessary.