fixing regex/null checking