Removing redundant if check