search(): Move nullValue variable into local scope