Fix toKeyUp to convert empty string to null.