prevent panic when empty flag

fix #6486