Null check before regex clause. Disabled sql debug