Is this really necessary? I would remove this check altogether. It adds a fair bit of complexity and checks an extremely rare case...!