Fix error when regexp match is null.