move `length>0' function into ol-utils