add empty check for vectors