Test isdefined and fix a type-stability problem in writing arrays of strings