Initialise variable instead of throws exception

I am not sure, does it right, or wrong, but it's fixes #287.
Also there is small pregmatch tests refactoring