Improve undefined test and string style. Also update docs for accuracy.