take into account cases where value is not a string