Add _stencil is nil test, add warning log.
Merge pull request #4452 from boyu0/add_stencil_nil_test

[ci skip]Add _stencil is nil test, add warning log.