Fix emptyness check