You can return "null" after the loop, incase the if condition in your loop is not executed.....