Changed form.parent comparison to null instead of empty