Add none check for unicode slicing, remove duplicate code, add test for non-ascii unicode strings and None