Remove Redundant Checks

Remove Redundant Checks as substr will return the same result as earlier
checks.
Merge pull request #1049 from mkly/redundant_conditional

Remove Redundant Checks