improving null test