Fixed bug where null search result type was causing a NullPointerException to be thrown