Check is.character as well as empty string, guard against logical()