If i remove that If stmt then the testcase would fail.  So just did a minor modification to that condition so that there is no an empty if condition.