fix warning about use of regexp on undef string