isGap method added to utils