notEmpty method is more generic now