Add search type if statement