protect against nil return from string.match