added check for null in searchname for pp