Fix check RegExp if value.length == 0