Remove Redundant Checks

Remove Redundant Checks as substr will return the same result as earlier
checks.