Why is this if block needed?