Made sure that a child element exists before the check is done, fixes jQuery bug...