Removed useless if statement. Added test case.
Removed useless if statement.