handle null pattern on find