item is a jquery object, use length to determine defined-ness