Fix #514: add distance between string and None