#5465 use strlen instead of empty