Added test for createPattern with 'null' string